Difference between revisions of "Template:LangSwitch"

From Veloopti Help
Jump to: navigation, search
(this should use a Lua module (possibly part of the Translate MW-extension also based on Lua) for full and faster processing of many possible parameter names (lang codes) and full support of fallbacks (still missing))
Line 1: Line 1:
 
{{{  
 
{{{  
   {{#switch: {{{ {{#if:{{{lang|}}}|{{{lang}}}|{{int:Lang}}}} |}}}  
+
   {{#switch: {{{ {{Uselang|lang={{{lang|}}}}} |}}}  
 
   | ~ = empty
 
   | ~ = empty
   |  = {{#switch: {{{ {{GetFallback| {{#if:{{{lang|}}}|{{{lang}}}|{{int:Lang}}}} |default=default}} |}}}  
+
   |  = {{#switch: {{{ {{GetFallback| {{Uselang|lang={{{lang|}}}}} |default=default}} |}}}
 
     | ~ = empty
 
     | ~ = empty
     |  = {{#switch: {{{ {{GetFallback2| {{#if:{{{lang|}}}|{{{lang}}}|{{int:Lang}}}} |default=default}} |}}}  
+
     |  = {{#switch: {{{ {{GetFallback2| {{Uselang|lang={{{lang|}}}}} |default=default}} |}}}
 
       | ~        = empty
 
       | ~        = empty
 
       |          = {{#if: {{{default|}}} | default | en }}
 
       |          = {{#if: {{{default|}}} | default | en }}
       | #default = {{GetFallback2| {{#if:{{{lang|}}}|{{{lang}}}|{{int:Lang}}}} |default=default}}  
+
       | #default = {{GetFallback2| {{Uselang|lang={{{lang|}}}}} |default=default}}
       }}  
+
       }}
     | #default = {{GetFallback| {{#if:{{{lang|}}}|{{{lang}}}|{{int:Lang}}}} |default=default}}  
+
     | #default = {{GetFallback| {{Uselang|lang={{{lang|}}}}} |default=default}}
 
     }}
 
     }}
   | #default = {{#if:{{{lang|}}}|{{{lang}}}|{{int:Lang}}}}  
+
   | #default = {{Uselang|lang={{{lang|}}}}}
 
   }}  
 
   }}  
 
|}}}
 
|}}}

Revision as of 10:07, 27 October 2013