Difference between revisions of "Template:If lang"

From Kerbal Space Program Wiki
Jump to: navigation, search
Line 36: Line 36:
  
 
[[Category:Language templates|If lang]]
 
[[Category:Language templates|If lang]]
 +
[[Category:Templates from the Team Fortress 2 Wiki|If lang]]
 
</noinclude>
 
</noinclude>

Revision as of 18:29, 12 October 2012

Documentation for If lang

{{if lang}} is a template that can output specified values based on whether a particular page is a language subpage or not.

Usage

Code English page result Language page result (de)
[[Soldier{{if lang}}]] Soldier Soldier/de
[[Soldier {{if lang}}]] Soldier Soldier /de

Advanced

{{if lang}} can be used in more advanced ways by specifying the English and non-English outputs.

  • {{if lang|non-en=_{{SUBPAGENAME}}}} will generate _de when used on Equalizer/de.
    • This example is used in infobox templates to display item name images in the correct language.

Languages supported

{{if lang}} recognises only the below language subpages (the same as {{lang}}):

Available languages ar, cs, da, de, es, fi, fr, hu, it, ja, ko, nl, no, pl, pt, pt-br, ro, ru, sv, tr, zh-hans, zh-hant