User:結衣/Template:Uselang: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Optimize language detection and validation)
Tag: Replaced
(Add backwards-compatibility with Template:Uselang revision 283828)
Line 1: Line 1:
<onlyinclude>{{ #if: {{{ 0 | }}}<!--
<onlyinclude>{{ #if: {{{ 1 | }}}<!--Language specified?
           -->| {{ #ifeq: {{#language: {{{ 0 | }}} | {{{ 0 | }}}}}
           -->| {{ #ifeq: {{#language: {{{ 1 | }}} | {{{ 1 | }}}}}
                      | {{{ 0 | }}}
              | {{{ 1 | }}}<!--Translate {{{1}}} to language {{{1}}}; no MediaWiki language code translates to itself.-->
                      |  
              | <!--NULL-->
                      | 1
              | 1
               }}
               }}
             | {{PAGELANGUAGE}}
             | {{ #if: {{ Yesno | {{{ default-none | }}} }}
              | {{ #ifeq: {{PAGELANGUAGE}}
                | {{CONTENTLANGUAGE}}
                | <!--NULL-->
                | {{{ pref | }}}
                }}
              | {{{ pref | }}}
              }}{{ #if: {{ Yesno | {{{ default-none | }}} }}
                | <!--NULL-->
                |{{PAGELANGUAGE}}
                }}{{{ suf | }}}
             }}</onlyinclude>
             }}</onlyinclude>

Revision as of 15:54, 1 May 2023

en