Teamplaid:language/documentation
This is a documentation subpage for Teamplaid:language. It contains usage information, categories and other content that is not part of the original teamplaid page. |
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
deasaichThe 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).
|
|
|
|
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
deasaichFaic cuideachd - Also see
- Teamplaid:X - returns the local name of the language
- svn:/trunk/phase3/languages/Names.php
- {{Language/ISO 639/en}} - returns the language name given a ISO 639 code (as opposed to the codes used in MediaWiki). Works for all 639-1, 639-2, 639-3 codes (you may have trouble editing it because of the size). Similar to en:Template:Language and fr:Modèle:Langue-local.