Template:LangSwitch: Difference between revisions
Jump to navigation
Jump to search
(Seems I did it, sans this small adjustment :-) |
(Clarification: This template is mainly meant for templates.) |
||
Line 3: | Line 3: | ||
__NOTOC__ | __NOTOC__ | ||
== Goal == | == Goal == | ||
This template will show texts in different languages depending on the language of the page it is placed on. | This template will show texts in different languages depending on the language of the page it is placed on. It is mainly meant for use in templates. | ||
Line 62: | Line 62: | ||
Using equal signs inside template parameters will break the template. Two ways around this is to either use {{tl|{{=}}}} or <nowiki>=</nowiki>. | Using equal signs inside template parameters will break the template. Two ways around this is to either use {{tl|{{=}}}} or <nowiki>=</nowiki>. | ||
== Related | == Related content == | ||
* [[Help:Templates#Translating templates]] | |||
* [[:Category:Language templates]] | * [[:Category:Language templates]] | ||
Revision as of 15:46, 28 November 2013
The following template description is not displayed when the template is inserted in an article.
Goal
This template will show texts in different languages depending on the language of the page it is placed on. It is mainly meant for use in templates.
The language the text will be shown in depends on the two letter language code between the page namespace and the page title, for example Talk:De/HB Radio-NAV. If a parameter with a text is not available in the language of the page or is empty, the English text will be shown instead provided it is available.
Usage
The parameters of this template corresponds to the ISO 639-1 two letter language code for the language to be used in that parameter.
{{LangSwitch |de= |en= |es= |fr= |nl= |ru=}}
{{LangSwitch |de = |en = |es = |fr = |nl = |ru = }}
Examples of language codes
ISO 639-1
two letter code |
English name of language |
---|---|
ca | Catalan |
de | German |
en | English |
es | Spanish |
fa | Farsi |
fi | Finnish |
fr | French |
nl | Dutch |
pl | Polish |
pt | Portugese |
ru | Russian |
sv | Swedish |
zh | Chinese |
Known issues
Using equal signs inside template parameters will break the template. Two ways around this is to either use {{=}} or <nowiki>=</nowiki>.