This template is protected from editing.
Difference between revisions of "Template:Mw-langlink"
m |
(Add TFW as valid namespace, support non-main namespaces (edit by darkid)) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{#switch:{{NAMESPACE}} <!-- Whitelisting certain namespaces --> | {{#switch:{{NAMESPACE}} <!-- Whitelisting certain namespaces --> | ||
| Template | | Template | ||
+ | | Help | ||
+ | | Team Fortress Wiki | ||
+ | | Talk | ||
| Category | | Category | ||
+ | | User | ||
| blank | | blank | ||
| none | | none | ||
− | | {{ns:0}} = {{# | + | | {{ns:0}} = {{#ifexist:{{#ifeq:{{NAMESPACE}}|{{ns:0}}||{{NAMESPACE}}:}}{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}} |
− | + | |{{#ifeq:{{NAMESPACE}}|{{ns:0}}||{{NAMESPACE}}:}}{{{{if lang|non-en=BASE}}PAGENAME}}{{#if:{{{en|}}}||/{{{1|}}}}}|-}} <!--End #ifexist --> | |
− | + | | #default = - | |
− | + | }}<noinclude>{{protected|small=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 | + | |
− | [[Category:Language templates | + | [[Category:Templates]] |
+ | [[Category:Language templates]] | ||
+ | [[Category:Interface templates]] | ||
</noinclude> | </noinclude> |