Template:Mw-langlink: Difference between revisions

From the Portal Wiki
Jump to navigation Jump to search
m (Protected "Template:Mw-langlink" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
(Stopping the lang nav link to the root page translations of a non-translation sub-page.)
Line 8: Line 8:
  | {{ns:0}} = {{#switch:{{{en|}}}
  | {{ns:0}} = {{#switch:{{{en|}}}
   | true = {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{BASEPAGENAME}}|{{NAMESPACE}}:{{BASEPAGENAME}}}}
   | true = {{#ifeq:{{NAMESPACE}}|{{ns:0}}|{{BASEPAGENAME}}|{{NAMESPACE}}:{{BASEPAGENAME}}}}
   | #default = {{#switch:{{NAMESPACE}}
   | #default = {{switch:{{SUBPAGENAME}}
     | {{ns:0}} = {{#ifexist:{{BASEPAGENAME}}/{{{1|}}}|{{BASEPAGENAME}}/{{{1|}}}|-}}
    |#default = {{#switch:{{NAMESPACE}}
    | #default = {{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1|}}}|{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1|}}}|-}}
      | {{ns:0}} = {{#ifexist:{{PAGENAME}}/{{{1|}}}|{{PAGENAME}}/{{{1|}}}|-}}
      | #default = {{#ifexist:{{NAMESPACE}}:{{PAGENAME}}/{{{1|}}}|{{NAMESPACE}}:{{PAGENAME}}/{{{1|}}}|-}}
      }}
    | ar
    | cs
    | da
    | de
    | es
    | fi
    | fr
    | hu
    | it
    | ja
    | ko
     | nl
    | no
    | pl
    | pt
    | pt-br
    | ro
    | ru
    | sv
    | zh-hans
    | zh-hant = {{#switch:{{NAMESPACE}}
      | {{ns:0}} = {{#ifexist:{{BASEPAGENAME}}/{{{1|}}}|{{BASEPAGENAME}}/{{{1|}}}|-}}
      | #default = {{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1|}}}|{{NAMESPACE}}:{{BASEPAGENAME}}/{{{1|}}}|-}}
      }}
     }}
     }}
   }}
   }}

Revision as of 19:17, 26 April 2011

Template:Switch:Mw-langlink

Usage

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