Template:LangSwitch: Difference between revisions

Jump to navigation Jump to search
Now if this ain't elegant... If this works *any* language code is automatically supported
(I can now happily remove the disclaimer, the template is rather fully tested, and works. This calls for celebration! :-)
(Now if this ain't elegant... If this works *any* language code is automatically supported)
Line 1: Line 1:
{{#if: {{{ {{lc: {{#titleparts: {{PAGENAME}} | 1}} }}| }}} | {{#switch: {{lc: {{#titleparts: {{PAGENAME}} | 1}} }}
{{#if: {{{ {{lc: {{#titleparts: {{PAGENAME}} | 1}} }}| }}} | {{{ {{lc: {{#titleparts: {{PAGENAME}} | 1}} }} }}} | {{{en}}} }}<noinclude>
|ca = {{{ca}}}
|de = {{{de}}}
|en = {{{en}}}
|es = {{{es}}}
|fa = {{{fa}}}
|fi = {{{fi}}}
|fr = {{{fr}}}
|nl = {{{nl}}}
|pl = {{{pl}}}
|pt = {{{pt}}}
|ru = {{{ru}}}
|sv = {{{sv}}}
|zh = {{{zh}}}
| {{{en}}} }} | {{{en}}} }}<noinclude>
{{Informative template|1=
{{Informative template|1=
__NOTOC__
__NOTOC__
Line 40: Line 26:
</pre>
</pre>


=== Supported language codes ===
=== Examples of language codes ===
{{{!}} class="wikitable"
{{{!}} class="wikitable"
! ISO 639-1  
! ISO 639-1  

Navigation menu