Template:Ls/doc: Difference between revisions
Template page
More actions
m corrected ar |
m syntaxhighlight lang="wikitext" |
||
| (6 intermediate revisions by 6 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|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.}} | ||
{{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 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.}} | ||
{{ls|mk|Овој текст е на македонски јазик.}} | {{ls|mk|Овој текст е на македонски јазик.}} | ||
{{ls|ar|هذا النص | {{ls|ar|هذا النص القديم في اللغة العربية.}} | ||
</div> | </div> | ||
|} | |} | ||
| Line 25: | 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|en|This new text is English}} | {{ls|en|This new text is English}} | ||
{{ls|fr|Cet ancien texte est en français.|update=en}} | {{ls|fr|Cet ancien texte est en français.|update=en}} | ||
{{ls|mk|Овој стар текст е на македонски јазик|update=en}} | {{ls|mk|Овој стар текст е на македонски јазик|update=en}} | ||
{{ls|ar|هذا النص | {{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"> | ||
{{ls|de|Dieser Text ist auf Deutsch.}} | {{ls|de|Dieser Text ist auf Deutsch.}} | ||
{{ls|diq|Eno nuşte zazakiyo.}} | |||
{{ls|en|This new text is in English.}} | {{ls|en|This new text is in English.}} | ||
{{ls|fr|Cet ancien texte est en français.|update=en}} | {{ls|fr|Cet ancien texte est en français.|update=en}} | ||
{{ls|mk|Овој стар текст е на македонски јазик|update=en}} | {{ls|mk|Овој стар текст е на македонски јазик|update=en}} | ||
{{ls|ar|هذا النص | {{ls|ar|هذا النص القديم في اللغة العربية.|update=en}} | ||
</div> | </div> | ||
|} | |} | ||
;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|en|This text is in English.|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|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|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"> | ||
{{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|en|This text is in English.|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|fr|Ce texte est en français.|CSS-box=background:#CCF;color:#000;|CSS-label=background:#00F;color:#FFF;}} | ||
| Line 63: | Line 109: | ||
</div> | </div> | ||
|} | |} | ||
<!-- template categories --> | <!-- template categories --> | ||