Template:If lang link

From Kerbal Space Program Wiki
Revision as of 12:03, 19 December 2014 by BobBot (talk | contribs) (*renamed Parameter Table to Parameter table;)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creates a link which automatically links to the article in the same language. Requires one parameter to the link target. Optionally it allows another link text in the same languages supported by {{lang}}.

{{if lang link|Main Page}} would create a link to the Main Page if on an English page and to Main Page/ru if on an Russian page.

Parameters

#/Name Optional Description
1 × No Target's name. If not set will use {{{en}}}.
2 or en ✓ Yes Visible link text. Default: {{{1}}}
de , pl or ✓ Yes Visible link text in other languages. Default: Not set
force ✓ Yes Forced language target. Usually not required, but can be used to test what that template would show in a different language. Default: Not set

Examples

Code View
English German Russian
{{if lang link|Mk16 Parachute|ru=Парашют Mk16}} Mk16 Parachute Mk16 Parachute Парашют Mk16
{{if lang link|Kerbol|en=Sun|de=Sonne|ru=Солнце}} Sun Sonne Солнце
{{if lang link|Kerbol|en=Sun|de=Sonne|ru=Солнце|force=de}} Sonne Sonne Sonne