Template:Ls/doc: Difference between revisions
Template page
More actions
rv translations (these are examples, there should only be 2 for contrast) |
m syntaxhighlight lang="wikitext" |
||
| (18 intermediate revisions by 10 users not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{TemplateBox | ||
|1=1 | |||
|1d=Language code (e. g. <code>en</code>) | |||
|1def= | |||
|1stat=required | |||
==Usage== | |2=2 | ||
{| class=" | |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 == | |||
{|class="wikitable" style="width:100%" | |||
|- | |- | ||
| < | |width="60%"|<syntaxhighlight lang="wikitext"><div class="multilingual"> | ||
{{ls|en|This text is English}} | {{ls|de|Dieser Text ist auf Deutsch.}} | ||
{{ls|fr| | {{ls|diq|Eno nuşte zazakiyo.}} | ||
</div></ | {{ls|en|This text is in English.}} | ||
|style="font-size:3em;"| → | {{ls|fr|Ce texte est en français.}} | ||
| <div class="multilingual"> | {{ls|mk|Овој текст е на македонски јазик.}} | ||
{{ls|en|This text is English}} | {{ls|ar|هذا النص القديم في اللغة العربية.}} | ||
{{ls|fr| | </div></syntaxhighlight> | ||
|style="font-size:3em;"|→ | |||
|width="40%"|<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> | </div> | ||
|} | |} | ||
=== Parameters === | |||
;Outdated translations | |||
===Parameters=== | |||
; Outdated translations | |||
:To mark a translation as outdated: | :To mark a translation as outdated: | ||
:{| class=" | :{|class="wikitable" style="width:100%" | ||
|- | |- | ||
| < | |width="60%"|<syntaxhighlight lang="wikitext"><div class="multilingual"> | ||
{{ls| | {{ls|de|Dieser Text ist auf Deutsch}} | ||
{{ls| | {{ls|diq|Eno nuşte zazakiyo.}} | ||
{{ls|en|This new text is English}} | {{ls|en|This new text is English}} | ||
{{ls|fr|This | {{ls|fr|Cet ancien texte est en français.|update=en}} | ||
{{ls|mk|Овој стар текст е на македонски јазик|update=en}} | |||
{{ls|ar|هذا النص القديم في اللغة العربية.|update=en}} | |||
</div></syntaxhighlight> | |||
|style="font-size:3em;"|→ | |||
|width="40%"|<div class="multilingual"> | |||
{{ls|de|Dieser Text ist auf Deutsch.}} | |||
{{ls|diq|Eno nuşte zazakiyo.}} | |||
{{ls|en|This new text is in English.}} | |||
{{ls|fr|Cet ancien texte est en français.|update=en}} | |||
{{ls|mk|Овој стар текст е на македонски јазик|update=en}} | |||
{{ls|ar|هذا النص القديم في اللغة العربية.|update=en}} | |||
</div> | </div> | ||
|} | |} | ||
;Customize appearance | |||
; | :To customize the appearance using CSS: | ||
: To customize the appearance using CSS: | :{|class="wikitable" style="width:100%" | ||
:{| class=" | |||
|- | |- | ||
| < | |width="60%"|<syntaxhighlight lang="wikitext"><div class="multilingual"> | ||
{{ls|en|This text is English|CSS-box=background:#000; color:#FFF;}} | {{ls|de|Dieser Text ist auf Deutsch.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
{{ls|fr| | {{ls|diq|Eno nuşte zazakiyo.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
</div></ | {{ls|en|This text is in English.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
|style="font-size:3em;"| → | {{ls|fr|Ce texte est en français.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
| <div class="multilingual"> | {{ls|mk|Овој текст е на македонски јазик.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
{{ls|en|This text is English|CSS-box=background:#000; color:#FFF;}} | {{ls|ar|هذا النص باللغة العربية.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
{{ls|en| | </div></syntaxhighlight> | ||
|style="font-size:3em;"|→ | |||
|width="40%"|<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> | </div> | ||
|} | |} | ||
<!-- template categories --> | <!-- template categories --> | ||
{{DEFAULTSORT:Ls}} | |||
<includeonly> | <includeonly> | ||
[[Category:Tools and scripts]] | [[Category:Tools and scripts]] | ||
</includeonly> | </includeonly> | ||