This template is protected from editing.

Difference between revisions of "Template:Mw-langlink"

From Team Fortress Wiki
Jump to: navigation, search
m (more darkid changes)
(Add TFW as valid namespace, support non-main namespaces (edit by darkid))
 
Line 2: Line 2:
 
  | Template
 
  | Template
 
  | Help
 
  | Help
 +
| Team Fortress Wiki
 
  | Talk
 
  | Talk
 
  | Category
 
  | Category
Line 7: Line 8:
 
  | blank
 
  | blank
 
  | none
 
  | none
  | {{ns:0}} = {{#ifexist:{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}
+
  | {{ns:0}} = {{#ifexist:{{#ifeq:{{NAMESPACE}}|{{ns:0}}||{{NAMESPACE}}:}}{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}
|{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}|-}} <!--End #ifexist -->
+
|{{#ifeq:{{NAMESPACE}}|{{ns:0}}||{{NAMESPACE}}:}}{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}|-}} <!--End #ifexist -->
 
  | #default = -
 
  | #default = -
 
}}<noinclude>{{protected|small=1}}
 
}}<noinclude>{{protected|small=1}}
Line 14: Line 15:
 
* {{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:Templates]]
[[Category:Language templates|Mw-langlink]]
+
[[Category:Language templates]]
[[Category:Interface templates|Mw-langlink]]
+
[[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.