Template:Ls: Difference between revisions
Template page
More actions
m Protected Template:Ls: Widely used template ([edit=autoconfirmed] (indefinite) [move=autoconfirmed] (indefinite)) |
m xml:lang not needed (generated from the existing lang attribute by MediaMiki), add support for optional additional classes for the container (such as classes=description) |
||
| Line 1: | Line 1: | ||
<includeonly><div class="lang-{{{1| | <includeonly><div class="{{{classes|}}} {{{1|{{int:lang}}}}} lang-{{{1|{{int:lang}}}}}" lang="{{{1|{{int:lang}}}}}" style="margin:0.3em 0;line-height:1.2;direction:{{#switch:{{lc:{{{dir|}}}}}|ltr|rtl={{lc:{{{dir|}}}}}|#default={{dir|{{{1|}}}}}}};{{#if:{{{update|}}}|background:#FDD;}}{{{CSS-box|}}}"><span class="langlabel-{{{1|{{int:lang}}}}}" lang="{{{1|{{int:lang}}}}}" style="font-weight:bold;{{#switch:{{{1|{{int:lang}}}}}|und=color:#F00;}}{{{CSS-label|}}}">{{#language:{{{1|{{int:lang}}}}}}}{{int:colon}}</span>{{#if:{{{update|}}}| [<small>{{snippets/update needed|{{{1}}}}}{{int:colon}} {{{update|}}}</small>]}} {{{2}}}</div></includeonly><noinclude>{{documentation}}</noinclude> | ||
Revision as of 16:08, 18 December 2011
This documentation is transcluded from Template:Ls/doc.
This template wraps translations for Language select, a script which dynamically hides languages when the user's preferred language is available.
Usage
{{ls |1= |2= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | Language code (e. g. en) | empty | required | |
2 | Text in that language | empty | required | |
update | If the language text needs update, then the new text's language code (e. g. en) | empty | optional | |
CSS-box | CSS style for the whole text | empty | optional | |
CSS-label | CSS style only for the label ("English:" text) | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Localization
This template is not intended to be localized.
To translate the "update needed" message, edit {{snippets/update needed}}.
Usage
<div class="multilingual">
{{ls|de|Dieser Text ist auf Deutsch.}}
{{ls|diq|Eno nuşte zazakiyo.}}
{{ls|en|This text is in English.}}
{{ls|fr|Ce texte est en français.}}
{{ls|mk|Овој текст е на македонски јазик.}}
{{ls|ar|هذا النص القديم في اللغة العربية.}}
</div>
|
→ | Deutsch: Dieser Text ist auf Deutsch.
Zazaki: Eno nuşte zazakiyo.
English: This text is in English.
français: Ce texte est en français.
македонски: Овој текст е на македонски јазик.
العربية: هذا النص القديم في اللغة العربية.
|
Parameters
- Outdated translations
- To mark a translation as outdated:
<div class="multilingual"> {{ls|de|Dieser Text ist auf Deutsch}} {{ls|diq|Eno nuşte zazakiyo.}} {{ls|en|This new text is English}} {{ls|fr|Cet ancien texte est en français.|update=en}} {{ls|mk|Овој стар текст е на македонски јазик|update=en}} {{ls|ar|هذا النص القديم في اللغة العربية.|update=en}} </div>
→ Deutsch: Dieser Text ist auf Deutsch.Zazaki: Eno nuşte zazakiyo.English: This new text is in English.français: [update needed: en] Cet ancien texte est en français.македонски: [update needed: en] Овој стар текст е на македонски јазикالعربية: [update needed: en] هذا النص القديم في اللغة العربية.
- Customize appearance
- To customize the appearance using CSS:
<div class="multilingual"> {{ls|de|Dieser Text ist auf Deutsch.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} {{ls|diq|Eno nuşte zazakiyo.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} {{ls|en|This text is in English.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} {{ls|fr|Ce texte est en français.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} {{ls|mk|Овој текст е на македонски јазик.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} {{ls|ar|هذا النص باللغة العربية.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} </div>
→ Deutsch: Dieser Text ist auf Deutsch.Zazaki: Eno nuşte zazakiyo.English: This text is in English.français: Ce texte est en français.македонски: Овој текст е на македонски јазик.العربية: هذا النص باللغة العربية.