Template:Language exist/doc

From Official Factorio Wiki
< Template:Language exist
Revision as of 16:10, 24 March 2020 by Bilka (talk | contribs) (Created page with "Shows a flag if a translated page with the given suffix exists, otherwise shows <code><nowiki><span></span></nowiki></code>. === Further explanation === Input: Given languag...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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)

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