Difference between revisions of "Template:If lang link"
From Kerbal Space Program Wiki
(Created page with "[[{{{1}}}{{if lang}}|{{{1}}}]]<noinclude> ---- Creates a link which automatically links to the article in the same language. Has one parameter to the link target. <tt><nowiki...") |
(+force;) |
||
Line 1: | Line 1: | ||
− | [[{{{1}}}{{if lang}}|{{{1}}}]]<noinclude> | + | [[{{{1}}}{{if lang|from={{{force|}}}}}|{{{2|{{{1}}}}}}]]<noinclude> |
---- | ---- | ||
Creates a link which automatically links to the article in the same language. Has one parameter to the link target. | Creates a link which automatically links to the article in the same language. Has one parameter to the link target. | ||
− | <tt><nowiki>{{if lang link|Main Page}}</nowiki></tt> would create a link to the [[Main Page]] if on an English page and to [[Main Page/ru]] if on an Russian page.</noinclude> | + | <tt><nowiki>{{if lang link|Main Page}}</nowiki></tt> would create a link to the [[Main Page]] if on an English page and to [[Main Page/ru]] if on an Russian page. |
+ | |||
+ | {{Parameter Table|name=both|parameters= | ||
+ | {{ParameterRow|1|Target's name}} | ||
+ | {{ParameterRow|2|Visible link text.|{{{1}}}}} | ||
+ | {{ParameterRow|force|Forced language target|Not set}} | ||
+ | }}</noinclude> |
Revision as of 18:34, 16 May 2013
[[{{{1}}}|{{{1}}}]]
Creates a link which automatically links to the article in the same language. Has one parameter to the link target.
{{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.