This template is protected from editing.

Difference between revisions of "Template:Mw-langlink"

From Team Fortress Wiki
Jump to: navigation, search
(Add TFW as valid namespace, support non-main namespaces (edit by darkid))
 
(7 intermediate revisions by 3 users not shown)
Line 2: Line 2:
 
  | Template
 
  | Template
 
  | Help
 
  | Help
 +
| Team Fortress Wiki
 +
| Talk
 
  | Category
 
  | Category
 +
| User
 
  | blank
 
  | blank
 
  | none
 
  | none
  | {{ns:0}} = {{#switch:{{{en|}}}
+
  | {{ns:0}} = {{#ifexist:{{#ifeq:{{NAMESPACE}}|{{ns:0}}||{{NAMESPACE}}:}}{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}
  | true = {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{BASEPAGENAME}}|{{NAMESPACE}}:{{BASEPAGENAME}}}}
+
|{{#ifeq:{{NAMESPACE}}|{{ns:0}}||{{NAMESPACE}}:}}{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}|-}} <!--End #ifexist -->
  | #default = {{#switch:{{NAMESPACE}}
+
  | #default = -
    | {{ns:0}} = {{#ifexist:{{BASEPAGENAME}}/{{{1|}}}|{{BASEPAGENAME}}/{{{1|}}}|-}}
+
}}<noinclude>{{protected|small=1}}
    | #default = {{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1|}}}|{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1|}}}|-}}
 
    }}
 
  }}
 
  | #default = -}}<noinclude>{{protected|small=1}}
 
 
== Usage ==
 
== Usage ==
 
* {{tlx|mw-langlink|2=fr}} on [[Hats]] will display the text "{{code|Hats/fr}}" (no link). See talk.
 
* {{tlx|mw-langlink|2=fr}} on [[Hats]] will display the text "{{code|Hats/fr}}" (no link). See talk.
[[Category:Templates|Mw-langlink]]
+
 
[[Category:Language templates|Mw-langlink]]
+
[[Category:Templates]]
 +
[[Category:Language templates]]
 +
[[Category:Interface templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 02:35, 13 November 2014

-

Usage

  • {{mw-langlink|fr}} on Hats will display the text "Hats/fr" (no link). See talk.