Template:Ls/doc: Difference between revisions
Template page
More actions
m syntaxhighlight lang="wikitext" |
|||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{TemplateBox | ||
|1=1 | |||
|1d=Language code (e. g. <code>en</code>) | |||
|1def= | |||
|1stat=required | |||
|2=2 | |||
|2d=Text in that language | |||
|2def= | |||
|2stat=required | |||
|3=update | |||
|3d=If the language text needs update, then the new text's language code (e. g. <code>en</code>) | |||
|3def= | |||
|3stat=optional- | |||
|4=CSS-box | |||
|4d=CSS style for the whole text | |||
|4def= | |||
|4stat=optional- | |||
|5=CSS-label | |||
|5d=CSS style only for the label ("English:" text) | |||
|5def= | |||
|5stat=optional- | |||
|name=ls | |||
|desc=This template wraps translations for [[Meta:Language select|Language select]], a script which dynamically hides languages when the user's preferred language is available. | |||
|namespace=all | |||
|usergroup=all | |||
|placement= | |||
|usage-notes= | |||
|type= | |||
|example= | |||
|i18n-method=- | |||
|i18n-desc=To translate the "update needed" message, edit {{[[template:snippets/update needed|snippets/update needed]]}}. | |||
|seealso= | |||
|setscats= | |||
|lines= | |||
|shorthand= | |||
|relieson= | |||
}} | |||
== Usage == | == Usage == | ||
{|class="wikitable" style="width:100%" | |||
|- | |- | ||
|width="60%"|< | |width="60%"|<syntaxhighlight lang="wikitext"><div class="multilingual"> | ||
{{ls|de|Dieser Text ist auf Deutsch.}} | {{ls|de|Dieser Text ist auf Deutsch.}} | ||
{{ls|diq|Eno nuşte zazakiyo.}} | {{ls|diq|Eno nuşte zazakiyo.}} | ||
| Line 12: | Line 52: | ||
{{ls|mk|Овој текст е на македонски јазик.}} | {{ls|mk|Овој текст е на македонски јазик.}} | ||
{{ls|ar|هذا النص القديم في اللغة العربية.}} | {{ls|ar|هذا النص القديم في اللغة العربية.}} | ||
</div></ | </div></syntaxhighlight> | ||
|style="font-size:3em;"|→ | |style="font-size:3em;"|→ | ||
|width="40%"|<div class="multilingual"> | |width="40%"|<div class="multilingual"> | ||
{{ls|de|Dieser Text ist auf Deutsch.}} | {{ls|de|Dieser Text ist auf Deutsch.}} | ||
{{ls|diq|Eno | {{ls|diq|Eno nuşte zazakiyo.}} | ||
{{ls|en|This text is in English.}} | {{ls|en|This text is in English.}} | ||
{{ls|fr|Ce texte est en français.}} | {{ls|fr|Ce texte est en français.}} | ||
| Line 27: | Line 67: | ||
;Outdated translations | ;Outdated translations | ||
:To mark a translation as outdated: | :To mark a translation as outdated: | ||
:{|class=" | :{|class="wikitable" style="width:100%" | ||
|- | |- | ||
|width="60%"|< | |width="60%"|<syntaxhighlight lang="wikitext"><div class="multilingual"> | ||
{{ls|de|Dieser Text ist auf Deutsch}} | {{ls|de|Dieser Text ist auf Deutsch}} | ||
{{ls|diq|Eno nuşte zazakiyo.}} | {{ls|diq|Eno nuşte zazakiyo.}} | ||
| Line 36: | Line 76: | ||
{{ls|mk|Овој стар текст е на македонски јазик|update=en}} | {{ls|mk|Овој стар текст е на македонски јазик|update=en}} | ||
{{ls|ar|هذا النص القديم في اللغة العربية.|update=en}} | {{ls|ar|هذا النص القديم في اللغة العربية.|update=en}} | ||
</div></ | </div></syntaxhighlight> | ||
|style="font-size:3em;"|→ | |style="font-size:3em;"|→ | ||
|width="40%"|<div class="multilingual"> | |width="40%"|<div class="multilingual"> | ||
| Line 49: | Line 89: | ||
;Customize appearance | ;Customize appearance | ||
:To customize the appearance using CSS: | :To customize the appearance using CSS: | ||
:{|class=" | :{|class="wikitable" style="width:100%" | ||
|- | |- | ||
|width="60%"|< | |width="60%"|<syntaxhighlight lang="wikitext"><div class="multilingual"> | ||
{{ls|de|Dieser Text ist auf Deutsch.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | {{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|diq|Eno nuşte zazakiyo.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
| Line 58: | Line 98: | ||
{{ls|mk|Овој текст е на македонски јазик.|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;}} | {{ls|ar|هذا النص باللغة العربية.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
</div></ | </div></syntaxhighlight> | ||
|style="font-size:3em;"|→ | |style="font-size:3em;"|→ | ||
|width="40%"|<div class="multilingual"> | |width="40%"|<div class="multilingual"> | ||
| Line 69: | Line 109: | ||
</div> | </div> | ||
|} | |} | ||
<!-- template categories --> | <!-- template categories --> | ||
Latest revision as of 19:54, 8 June 2023
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.Македонски: Овој текст е на македонски јазик.العربية : هذا النص باللغة العربية.