Ŝablono:Language/dokumentado
El Komunejo
< Ŝablono:Language(Malsamoj inter versioj)
(add examples using param 2 = fr and he) |
E ({{Ŝablona navigado}}) |
||
(5 mezaj versioj ne montrata.) | |||
Linio 1: | Linio 1: | ||
- | {{ | + | {{ŝablona navigado}} |
- | + | ||
- | + | 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 {{tl|Language/ISO 639/en}}). | |
- | + | ||
- | + | ==Examples== | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | | | + | |
- | + | ||
- | + | ||
- | + | ||
* <nowiki>{{language|ar}}</nowiki> → {{language|ar}} | * <nowiki>{{language|ar}}</nowiki> → {{language|ar}} | ||
* <nowiki>{{language|is}}</nowiki> → {{language|is}} | * <nowiki>{{language|is}}</nowiki> → {{language|is}} | ||
* <nowiki>{{language|zh-hant}}</nowiki> → {{language|zh-hant}} | * <nowiki>{{language|zh-hant}}</nowiki> → {{language|zh-hant}} | ||
+ | |||
+ | 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). | ||
* <nowiki>{{language|en|fr}}</nowiki> → {{language|en|fr}} | * <nowiki>{{language|en|fr}}</nowiki> → {{language|en|fr}} | ||
* <nowiki>{{language|en|he}}</nowiki> → {{language|en|he}} | * <nowiki>{{language|en|he}}</nowiki> → {{language|en|he}} | ||
- | + | ||
- | + | You can also use this template's subpages directly to achieve the same effect (which is also easier on the servers). | |
- | | | + | * <nowiki>{{language/en|de}}</nowiki> → {{language/en|de}} |
- | | | + | * <nowiki>{{language/zh-hans|de}}</nowiki> → {{language/zh-hans|de}} |
- | + | ||
- | * {{ | + | ==Subpages== |
+ | {{Special:PrefixIndex/Template:Language/}} | ||
+ | |||
+ | ==See also== | ||
+ | * {{x|language}} - returns the local name of the language | ||
* [[svn:/trunk/phase3/languages/Names.php]] | * [[svn:/trunk/phase3/languages/Names.php]] | ||
- | * | + | * {{tl|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]]. |
- | + | ||
- | + | ||
- | + | ||
- | + |
Nuna versio ekde 21:44, 11. Jan 2010
Ŝablono:Language • Dokumentado • Diskuto
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}}).
Examples
- {{language|ar}} → Arabic
- {{language|is}} → Icelandic
- {{language|zh-hant}} → Traditional Chinese
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|en|fr}} → anglais
- {{language|en|he}} → English
You can also use this template's subpages directly to achieve the same effect (which is also easier on the servers).
- {{language/en|de}} → German
- {{language/zh-hans|de}} → Ŝablono:Language/zh-hans
Subpages
Language/cs | Language/de | Language/dokumentado |
Language/empty | Language/en | Language/fr |
Language/pl |
See also
- {{#language:}} - 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.