This template is protected from editing.
Difference between revisions of "Template:Lang"
m (Protected "Template:Lang": will soon have a lot of transclusions ([edit=sysop] (indefinite) [move=sysop] (indefinite))) |
(better documentation) |
||
Line 56: | Line 56: | ||
| none | | none | ||
| #default = {{{en|{{{1|}}}}}} | | #default = {{{en|{{{1|}}}}}} | ||
− | }}<noinclude> | + | }}<noinclude>{{protected}} |
== Usage == | == Usage == | ||
− | The main purpose of this template is to retain consistency across multiple translated pages. | + | The main purpose of this template is to retain consistency across multiple translated pages. Using {{tl|lang}} will switch translations based on the value of <code><nowiki>{{SUBPAGENAME}}</nowiki></code>. |
− | + | * To define a language, simply use the code <code>| xx = </code> and then add your translation after (replacing xx with the correct code from below). | |
− | |||
− | * To define | ||
− | |||
− | |||
− | ; | + | {| class="wikitable grid" style="margin: 1em 0;" |
+ | ! Available languages | ||
+ | | af, ar, az, bcc, bg, br, ca, cs, da, de, el, es, fa, fi, fr, gl, gu, he, hu, id, it, ja, ka, ko, ksh, kw, mk, ml, mr, ms, nl, no, oc, pl, pt, ro, ru, si, sk, sq, sr, sv, ta, th, tr, uk, vi, yue, zh, zh-hans, zh-hant, zh-tw | ||
+ | |} | ||
+ | |||
+ | === Options === | ||
+ | |||
+ | * '''Forcing a particular language''': use the parameter ''|force = '' to force the template to display a particular language (useful on some English pages). This overrides <code><nowiki>{{SUBPAGENAME}}</nowiki></code>. | ||
+ | :<code><nowiki>{{lang|force=en}}</nowiki></code> | ||
+ | |||
+ | === Examples === | ||
<pre> | <pre> | ||
{{Ambox | {{Ambox |
Revision as of 07:45, 7 August 2010
Usage
The main purpose of this template is to retain consistency across multiple translated pages. Using {{lang}}
will switch translations based on the value of {{SUBPAGENAME}}
.
- To define a language, simply use the code
| xx =
and then add your translation after (replacing xx with the correct code from below).
Available languages | af, ar, az, bcc, bg, br, ca, cs, da, de, el, es, fa, fi, fr, gl, gu, he, hu, id, it, ja, ka, ko, ksh, kw, mk, ml, mr, ms, nl, no, oc, pl, pt, ro, ru, si, sk, sq, sr, sv, ta, th, tr, uk, vi, yue, zh, zh-hans, zh-hant, zh-tw |
---|
Options
- Forcing a particular language: use the parameter |force = to force the template to display a particular language (useful on some English pages). This overrides
{{SUBPAGENAME}}
.
{{lang|force=en}}
Examples
{{Ambox | contents = {{ambox/message | 1 = {{lang|de=Sprache|ja=言語|pl=Język}} | 2 = {{lang|de=Willkommen|ja=Irashaimasu|pl=Witaj}} }} }}