Template:LanguageSelector/doc: Difference between revisions
Template page
More actions
No edit summary |
update |
||
| (2 intermediate revisions by one other user not shown) | |||
| Line 6: | Line 6: | ||
* '''code''': English language codes | * '''code''': English language codes | ||
* '''anything else''': only text, no icons | * '''anything else''': only text, no icons | ||
|1def=''' | |1def='''yes''' | ||
|1stat=optional | |1stat=optional | ||
|2=<unnamed parameters, numbered 2.. | |2=<unnamed parameters, numbered 2..40> | ||
|2d=A language code. If present, a link for the corresponding language will be produced. Up to 19 language codes can currently be specified, and will display in the order indicated by the parameter sequence. If no unnamed parameters are specified, all languages will be displayed in the default order. | |2d=A language code. If present, a link for the corresponding language will be produced. Up to 19 language codes can currently be specified, and will display in the order indicated by the parameter sequence. If no unnamed parameters are specified, all languages will be displayed in the default order. | ||
|2def=optional | |2def=optional | ||
| Line 45: | Line 45: | ||
* [[w:List of languages by name|List of languages by English name]] | * [[w:List of languages by name|List of languages by English name]] | ||
* [[w:List of indigenous language names|List of languages in in their own writing systems]], you can also plunder any article with lots of interwiki links, like [[w:sex]] | * [[w:List of indigenous language names|List of languages in in their own writing systems]], you can also plunder any article with lots of interwiki links, like [[w:sex]] | ||
* [[ | * [[meta:List of Wikipedias]] at Meta | ||
* [[incubator:Main_Page]] list of proposed projects at Incubator | * [[incubator:Main_Page]] list of proposed projects at Incubator | ||
|setscats= | |setscats= | ||
| Line 54: | Line 54: | ||
* {{tl|LanguageSelector/switch}} maps language codes to icons | * {{tl|LanguageSelector/switch}} maps language codes to icons | ||
* {{tl|LanguageSelector/link}} produces a link to a single language, optionally with icon | * {{tl|LanguageSelector/link}} produces a link to a single language, optionally with icon | ||
** {{tl|UselangLink}} | ** {{tl|UselangLink}} | ||
* {{tl|LanguageSelector/ThisPageIn}} returns "This page in other languages", supports LangSwitch | * {{tl|LanguageSelector/ThisPageIn}} returns "This page in other languages", supports LangSwitch | ||
* {{tl|LanguageSelector/InterLanguageSpacer}} used to separate the language links from each other | * {{tl|LanguageSelector/InterLanguageSpacer}} used to separate the language links from each other | ||
| Line 61: | Line 61: | ||
}} | }} | ||
== Examples == | == Examples == | ||
<table class="wikitable"> | <table class="wikitable" width="100%"> | ||
<tr><td>{{tlc|LanguageSelector|de|en|fr|invalid}}</td><td>{{LanguageSelector|de|en|fr|invalid}}</td></tr> | <tr><th scope="col">Code</th><th scope="col">Rendering on page</th></tr> | ||
<tr><td>{{tlc|LanguageSelector|de|en|fr|invalid|6=action=edit}}</td><td>{{LanguageSelector|de|en|fr|invalid|action=edit}}</td></tr> | <tr><td>{{tlc|LanguageSelector|de|en|fr|invalid}}</td><td style="background:#FFF">{{LanguageSelector|de|en|fr|invalid}}</td></tr> | ||
<tr><td>{{tlc|LanguageSelector|de|en|fr|invalid|6=icons=code}}</td><td>{{LanguageSelector|de|en|fr|invalid|icons=code}}</td></tr> | <tr><td>{{tlc|LanguageSelector|de|en|fr|invalid|6=action=edit}}</td><td style="background:#FFF">{{LanguageSelector|de|en|fr|invalid|action=edit}}</td></tr> | ||
<tr><td>{{tlc|LanguageSelector|de|en|fr|5=notpiol=1}}</td><td>{{LanguageSelector|de|en|fr|invalid|notpiol=1}}</td></tr> | <tr><td>{{tlc|LanguageSelector|de|en|fr|invalid|6=icons=code}}</td><td style="background:#FFF">{{LanguageSelector|de|en|fr|invalid|icons=code}}</td></tr> | ||
<tr><td>{{tlc|LanguageSelector|de|en|fr|5=notpiol=1|6=icons=yes}}</td><td>{{LanguageSelector|de|en|fr|notpiol=1|icons=yes}}</td></tr> | <tr><td>{{tlc|LanguageSelector|de|en|fr|5=notpiol=1}}</td><td style="background:#FFF">{{LanguageSelector|de|en|fr|invalid|notpiol=1}}</td></tr> | ||
<tr><td>{{tlc|LanguageSelector|de|en|fr|5=notpiol=1|6=icons=code}}</td><td>{{LanguageSelector|de|en|fr|notpiol=1|icons=code}}</td></tr> | <tr><td>{{tlc|LanguageSelector|de|en|fr|5=notpiol=1|6=icons=yes}}</td><td style="background:#FFF">{{LanguageSelector|de|en|fr|notpiol=1|icons=yes}}</td></tr> | ||
<tr><td>{{tlc|LanguageSelector|de|en|fr|5=notpiol=1|6=icons=only}}</td><td>{{LanguageSelector|de|en|fr|notpiol=1|icons=only}}</td></tr> | <tr><td>{{tlc|LanguageSelector|de|en|fr|5=notpiol=1|6=icons=code}}</td><td style="background:#FFF">{{LanguageSelector|de|en|fr|notpiol=1|icons=code}}</td></tr> | ||
<tr><td>{{tlc|LanguageSelector|de|en|fr|5=notpiol=1|6=icons=only}}</td><td style="background:#FFF">{{LanguageSelector|de|en|fr|notpiol=1|icons=only}}</td></tr> | |||
</table> | </table> | ||
There are more examples with the full list on [[Template:LanguageSelector/doc/examples]]. | |||
There are more examples with the default full list of languages on [[Template:LanguageSelector/doc/examples]]. | |||
: ''(Dont put examples with all languages here at it would break the transclusion of the documentation subpage in the main template page).'' | : ''(Dont put examples with all languages here at it would break the transclusion of the documentation subpage in the main template page).'' | ||