Difference between revisions of "Template:Uselang"

From Veloopti Help
Jump to: navigation, search
(attempt to retrieve the language code used by SwitchLang)
 
m (7 revisions imported)
 
(6 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#switch:                        {{{            {{#if: {{{lang|}}} | {{{lang|}}} | {{int:Lang}} }}
+
{{#if: {{{lang|}}} | {{{lang|}}} | {{#ifeq: {{int:Lang}} | <Lang> | default | {{int:Lang}} }} }}<noinclude>
                                  |}}}
+
{{ {{TNTN|Documentation}} |content=
|~        = empty
+
 
|        = {{#switch:           {{{ {{GetFallback
+
Returns the code of the user language, as specified in the corresponding page mediawiki:lang/xx, otherwise "en" (default).
                                      |1      = {{#if: {{{lang|}}} | {{{lang|}}} | {{int:Lang}} }}
+
 
                                      |default = default
+
MediaWiki:Lang:
                                      }}
+
{{languages|MediaWiki:Lang}}
                                  |}}}
+
}}
            |~      = empty
+
[[Category:Internationalization templates{{translation}}]]
            |        = {{#switch: {{{ {{GetFallback2
 
                                      |1      = {{#if: {{{lang|}}} | {{{lang|}}} | {{int:Lang}} }}
 
                                      |default = default
 
                                      }}
 
                                  |}}}
 
                      |        = {{#if: {{{default|}}} | default | en }}
 
                      |~        = empty
 
                      |#default =    {{GetFallback2
 
                                      |1      = {{#if: {{{lang|}}} | {{{lang|}}} | {{int:Lang}} }}
 
                                      |default = default
 
                                      }}
 
                      }}
 
            |#default=                {{GetFallback
 
                                      |1      = {{#if: {{{lang|}}} | {{{lang|}}} | {{int:Lang}} }}
 
                                      |default = default
 
                                      }}
 
            }}
 
|#default =                                      {{#if: {{{lang|}}} | {{{lang|}}} | {{int:Lang}} }}
 
}}<noinclude>
 
{{Documentation}}
 
 
</noinclude>
 
</noinclude>

Latest revision as of 21:47, 20 July 2017

⧼Lang⧽

50px Documentation[[[:Template:Fullurl:]] Read] • [[[:Template:Fullurl:]] Edit] • [[[:Template:Fullurl:]] View history] • [[[:Template:Fullurl:]] ⧼Code-rev-purge-link⧽]
Returns the code of the user language, as specified in the corresponding page mediawiki:lang/xx, otherwise "en" (default).

MediaWiki:Lang:

Language: English