This template is protected from editing.

Difference between revisions of "Template:Mw-langlink"

From Team Fortress Wiki
Jump to: navigation, search
m (add Italian)
(Add TFW as valid namespace, support non-main namespaces (edit by darkid))
 
(One intermediate revision by one other user not shown)
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:{{#switch:{{SUBPAGENAME}}
+
  | {{ns:0}} = {{#ifexist:{{#ifeq:{{NAMESPACE}}|{{ns:0}}||{{NAMESPACE}}:}}{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}
  |ar|cs|da|de|en|es|fi|fr|hu|it|ja|ko|nl|no|pl|pt|pt-br|ro|ru|tr|sv|zh-hans|zh-hant = {{#titleparts:{{FULLPAGENAME}}|-1}}
+
|{{#ifeq:{{NAMESPACE}}|{{ns:0}}||{{NAMESPACE}}:}}{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}|-}} <!--End #ifexist -->
  | #default = {{FULLPAGENAME}}
 
}}{{#if:{{{en|}}}||/{{{1|}}}}}|{{#switch:{{SUBPAGENAME}}
 
  |ar|cs|da|de|en|es|fi|fr|hu|it|ja|ko|nl|no|pl|pt|pt-br|ro|ru|tr|sv|zh-hans|zh-hant = {{#titleparts:{{FULLPAGENAME}}|-1}}
 
  | #default = {{FULLPAGENAME}}
 
}}{{#if:{{{en|}}}||/{{{1|}}}}}|-}} <!--End #ifexist -->
 
 
  | #default = -
 
  | #default = -
 
}}<noinclude>{{protected|small=1}}
 
}}<noinclude>{{protected|small=1}}
Line 19: 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.