Template:Language exist: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (Added Swedish)
(Add Category and Documentation)
Line 4: Line 4:
                   }}/{{{1}}} | {{#ifeq: {{{2|}}} | yes | {{Flag|{{{1}}}|text=yes}} | {{Flag|{{{1}}}}} }}
                   }}/{{{1}}} | {{#ifeq: {{{2|}}} | yes | {{Flag|{{{1}}}|text=yes}} | {{Flag|{{{1}}}}} }}
}}}}
}}}}
<noinclude>
{{documentation}}
[[Category:Localisation templates]]
</noinclude>

Revision as of 10:20, 1 September 2016



[View] [Edit] [Page history]

Documentation

Shows a flag if a translated page with the given suffix exists, otherwise shows <span></span>.

Further explanation

Input: Given language code, for example de; en for English

if on page with the given language code then

  show nothing -- nothing = <span></span>

else

  if <pagename without lang suffix>/<given lang code> exists then -- current page translated to given language
    show flag
  else
    show nothing -- nothing = <span></span>
  end

end
List of all templates