Template:LangSwitch/doc: Difference between revisions
More actions
+more examples, using '''lang''' |
Internationalisation in French |
||
| Line 1: | Line 1: | ||
{{TemplateBox | {{TemplateBox | ||
|1=xx | |1=xx | ||
|1d=''xx'' can be any number of any supported language codes | |1d= | ||
|1def=string in language ''xx'' | {{LangSwitch | ||
|en=''xx'' can be any number of any supported language codes | |||
|fr=''xx'' peut être tout code de lange, autant de fois que nécessaire | |||
}} | |||
|1def= | |||
{{LangSwitch | |||
|en=string in language ''xx'' | |||
|fr=texte dans la langue de code ''xx'' | |||
}} | |||
|2=lang | |2=lang | ||
|2d=language code (only needs to be provided if the language shall be fixed and independant from the user's preferences) | |2d= | ||
{{LangSwitch | |||
|en=language code (only needs to be provided if the language shall be fixed and independant from the user's preferences) | |||
|fr=code de langue (ne doit être indiqué que si la langue doit être fixée et indépendantes des préférences de l'utilisateur. | |||
}} | |||
|2def=value of <nowiki>{{int:Lang}}</nowiki> | |2def=value of <nowiki>{{int:Lang}}</nowiki> | ||
|2stat=optional- | |2stat=optional- | ||
|name=LangSwitch | |name=LangSwitch | ||
|desc=Provides a method to present a string of text selected from an array of many language translations in the language set in the user's preferences or the most appropiate fallback language (as determined by {{tl|GetFallback}}). | |desc= | ||
{{LangSwitch | |||
|en=Provides a method to present a string of text selected from an array of many language translations in the language set in the user's preferences or the most appropiate fallback language (as determined by {{tl|GetFallback}}). | |||
|fr=Permet de présenter un texte dans la langue de l’utilisateur, en sélectionnant depuis un ensemble de versions en différentes langues. La langue choisie est soit celle définie dans les préférences de l'utilisateur, soit la plus appropriée déterminée par {{tl|GetFallback}}. | |||
}} | |||
|namespace=Template | |namespace=Template | ||
|usergroup= | |usergroup= | ||
Revision as of 18:58, 10 October 2009
Provides a method to present a string of text selected from an array of many language translations in the language set in the user's preferences or the most appropiate fallback language (as determined by {{GetFallback}}).
Usage
{{LangSwitch
|xx =
}}
Click these links to see the action of the lang parameter in different languages: German: deutsch, French: français, Chinese-zh
Examples:
{{LangSwitch
|de=Zeichenkette
|en=text string
|fr=chaîne de caractères
|zh=字串
}}
What it looks like in your browser:
text string
Examples using parameter lang to default to a specific language:
{{LangSwitch
|lang=de
|de=Zeichenkette nur auf Deutsch
}}
What it looks like in your browser:
LangSwitch Error: no default
{{LangSwitch
|lang=en
|en=text only in English
}}
What it looks like in your browser:
text only in English
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
xx | xx can be any number of any supported language codes | string in language xx | optional | |
lang | language code (only needs to be provided if the language shall be fixed and independant from the user's preferences) | value of {{int:Lang}} | optional | |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: no user group specified
Relies on:
{{GetFallback}}, {{GetFallback2}}
See also
Localization
This template is not intended to be localized.