This template will return the name of a language given the language code. This template is made specifically for the language codes used in MediaWiki (not necessarily ISO codes, but see {{Language/ISO 639/en}}).

Eisimpleirean - Examples

deasaich

The second parameter can be used to set the desired output language, otherwise it will return the name in the user's interface language (if a translation exists).

  • {{language|ar}} → Arabais
  • {{language|ar|de}} → Arabais
  • {{language|ar|en}} → Arabais
  • {{language|ar|fr}} → Arabais
  • {{language|ar|he}} → Arabais
  • {{language|ar|zh-hans}} → Arabais
  • {{language|en}} → Beurla
  • {{language|en|de}} → Beurla
  • {{language|en|en}} → Beurla
  • {{language|en|fr}} → Beurla
  • {{language|en|he}} → Beurla
  • {{language|en|zh-hans}} → Beurla
  • {{language|is}} → Ìoslainnis
  • {{language|is|de}} → Ìoslainnis
  • {{language|is|en}} → Ìoslainnis
  • {{language|is|fr}} → Ìoslainnis
  • {{language|is|he}} → Ìoslainnis
  • {{language|is|zh-hans}} → Ìoslainnis
  • {{language|zh-hant}} → Traditional Chinese
  • {{language|zh-hant|de}} → Traditional Chinese
  • {{language|zh-hant|en}} → Traditional Chinese
  • {{language|zh-hant|fr}} → Traditional Chinese
  • {{language|zh-hant|he}} → Traditional Chinese
  • {{language|zh-hant|zh-hans}} → Traditional Chinese

You can also use this template's subpages directly to achieve the same effect (which is also easier on the servers, but you need to know the UI language code to use as the fallback for the target translation, as the syntax above uses the second parameter to determine the fallback applicable to it, in order to generate the subpage names). Given that the current UI language code is {{int:Lang}}=⧼Lang⧽, the examples above are then equivalent to:

Note that with this syntax, the use of the {{Fallback}} template is avoided in most cases because we know that templates do exist for all target languages specified in parameter 2 (de, en, fr, he, zh-hans), and that these templates contain a translation for all the languages specified in parameter 1 (ar, en, is, zh-hant). This is not necessarily true for all UI languages needed by users (notably for some rare UI languages, or newly added languages), for which a fallback translation to another language must be looked for.

Fo-dhuilleagan - Subpages

deasaich

Faic cuideachd - Also see