This template is protected from editing.

Difference between revisions of "Template:Lang cat"

From Team Fortress Wiki
Jump to: navigation, search
m (Protected "Template:Lang Cat" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
m (fix)
 
(17 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:{{#switch: {{SUBPAGENAME}}
+
{{#if:{{{1|}}}
| af = {{{1}}}/af
+
| {{#switch:{{lc:{{{namespace-overrride|{{NAMESPACE}}}}}}}<!--
| ar = {{{1}}}/ar
 
| az = {{{1}}}/az
 
| bcc = {{{1}}}/bcc
 
| bg = {{{1}}}/bg
 
| br = {{{1}}}/br
 
| ca = {{{1}}}/ca
 
| cs = {{{1}}}/cs
 
| da = {{{1}}}/da
 
| de = {{{1}}}/de
 
| el = {{{1}}}/el
 
| es = {{{1}}}/es
 
| fa = {{{1}}}/fa
 
| fi = {{{1}}}/fi
 
| fr = {{{1}}}/fr
 
| gl = {{{1}}}/gl
 
| gu = {{{1}}}/gu
 
| he = {{{1}}}/he
 
| hu = {{{1}}}/hu
 
| id = {{{1}}}/id
 
| it = {{{1}}}/it
 
| ja = {{{1}}}/ja
 
| ka = {{{1}}}/ka
 
| ko = {{{1}}}/ko
 
| ksh = {{{1}}}/ksh
 
| kw = {{{1}}}/kw
 
| mk = {{{1}}}/mk
 
| ml = {{{1}}}/ml
 
| mr = {{{1}}}/mr
 
| ms = {{{1}}}/ms
 
| nl = {{{1}}}/nl
 
| no = {{{1}}}/no
 
| oc = {{{1}}}/oc
 
| pl = {{{1}}}/pl
 
| pt = {{{1}}}/pt
 
| ro = {{{1}}}/ro
 
| ru = {{{1}}}/ru
 
| si = {{{1}}}/si
 
| sk = {{{1}}}/sk
 
| sq = {{{1}}}/sq
 
| sr = {{{1}}}/sr
 
| sv = {{{1}}}/sv
 
| ta = {{{1}}}/ta
 
| th = {{{1}}}/th
 
| tr = {{{1}}}/tr
 
| uk = {{{1}}}/uk
 
| vi = {{{1}}}/vi
 
| yue = {{{1}}}/yue
 
| zh = {{{1}}}/zh
 
| zh-hans = {{{1}}}/zh-hans
 
| zh-hant = {{{1}}}/zh-hant
 
| zh-tw = {{{1}}}/zh-tw
 
| #default = {{{1}}}
 
}}]]
 
<noinclude>{{protected}}
 
== Usage ==
 
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).
+
    // Blacklist certain namespaces from being placed in categories. -->
  
{| class="wikitable grid" style="margin: 1em 0;"
+
  | user
! Available languages
+
  | team fortress wiki
| 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
+
  | user talk
|}
+
  | team fortress wiki talk
 +
  | category talk
 +
  | help talk
 +
  | mediawiki talk
 +
  | template talk
 +
  | file talk
 +
  | talk = <!-- null -->
  
=== Examples ===
+
  | true
Placing
+
  | 1
<pre>
+
  | yes
{{Lang Cat|Scout}}
+
  | y
</pre>
 
on [[Force-A-Nature/ru]] adds
 
<pre>
 
[[Category:Scout/ru]]
 
</pre>
 
to the page.
 
  
[[Category:Templates|Lang Cat]]
+
  | blank
[[Category:Language templates|Lang Cat]]
+
  | none
 +
  | #default = [[Category:{{{1}}}{{if lang}}{{#if:{{{sort|}}}|{{!}}{{{sort|{{BASEPAGENAME}}}}}|<!--No sort specified-->}}]]<!--
 +
-->}}
 +
}}<noinclude>{{doc begin}}
 +
{{tl|lang cat}} places pages in their correct language category. It should only be used directly on [[:Category:Templates|templates]].
 +
 
 +
=== Usage ===
 +
* On [[Scattergun]], {{tlx|lang cat|Scout}} will add the page to [[:Category:Scout]]
 +
* On [[Scattergun/fr]], {{tlx|lang cat|Scout}} will add the page to [[:Category:Scout/fr]]
 +
* On [[Scout]], {{tlx|lang cat|Scout|3=sort= &amp;nbsp;}} will add the page to [[:Category:Scout]], but will use a space character as the sort key so it appears first in the category listing.<br />Note: The space before the &amp;nbsp; tag is important.
 +
 
 +
'''Advanced usage'''
 +
* By default {{tl|lang cat}} will ignore any Talk page or page in the User or Team Fortress Wiki namespace. However, this can be overriden for specific instances by setting the parameter {{code|namespace-override}} to {{code|true}}.
 +
* A specific sort-key can also be defined with the parameter {{code|sort}}. Keep in mind that using this parameter will use the specified sortkey for ''every'' page that the template is used on.
 +
 
 +
[[Category:Templates|Lang cat]]
 +
[[Category:Language templates|Lang cat]]
 +
[[Category:Categorization templates|Lang]]
 
</noinclude>
 
</noinclude>

Latest revision as of 20:02, 29 April 2013

Documentation for Lang cat

{{lang cat}} places pages in their correct language category. It should only be used directly on templates.

Usage

Advanced usage

  • By default {{lang cat}} will ignore any Talk page or page in the User or Team Fortress Wiki namespace. However, this can be overriden for specific instances by setting the parameter namespace-override to true.
  • A specific sort-key can also be defined with the parameter sort. Keep in mind that using this parameter will use the specified sortkey for every page that the template is used on.