Difference between revisions of "Template:LangFallback"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (*replace 'Parameter Row' and 'ParameterRow' by 'Parameter row';)
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>[[{{{1}}}{{#if: {{{force|}}}|/{{{force}}}|{{if lang}}}}{{{3|}}}|{{{2|{{{1}}}}}}]]{{#ifeq: {{{force|{{SUBPAGENAME}}}}}|{{PAGENAME}}||<sup>[[{{{1}}}{{{3|}}}|→ en]]</sup>}}</includeonly><noinclude>Creates a link with a link to the English version, if it isn't already in the English version.
+
<includeonly>[[{{{1}}}{{#if: {{{force|}}}|/{{{force}}}|{{if lang}}}}{{{3|}}}|{{{2|{{{1}}}}}}]]{{#if: {{{force|{{if lang}}}}}|&nbsp;<sup>[[{{{1}}}{{{3|}}}|→&nbsp;en]]</sup>}}</includeonly><noinclude>Creates a link with a link to the English version, if it isn't already in the English version.
  
 
== Parameters ==
 
== Parameters ==
Line 7: Line 7:
 
! Description
 
! Description
 
|-
 
|-
{{ParameterRow|1|Link target}}
+
{{Parameter row|1|Link target}}
{{ParameterRow|2|Link text.|1st parameter}}
+
{{Parameter row|2|Link text.|1st parameter}}
{{ParameterRow|3|Target section which will be added after the link target and language code.|Not set}}
+
{{Parameter row|3|Target section which will be added after the link target and language code.|Not set}}
{{ParameterRow|force|Forced language which replace {{Tl|if lang}}|Not set}}
+
{{Parameter row|force|Forced language which replace {{Tl|if lang}}|Not set}}
 
|}
 
|}
  
== Example ==
+
== Examples ==
 
<pre>{{LangFallback|Parts|force=ru}}</pre>
 
<pre>{{LangFallback|Parts|force=ru}}</pre>
{{LangFallback|Parts|force=ru}}</noinclude>
+
{{LangFallback|Parts|force=ru}}
 +
 
 +
<pre>{{LangFallback|Parts}}</pre>
 +
{{LangFallback|Parts}}</noinclude>

Latest revision as of 20:57, 26 November 2014

Creates a link with a link to the English version, if it isn't already in the English version.

Parameters

Name Optional Description
1 No Link target
2 Yes Link text. 1st parameter
3 Yes Target section which will be added after the link target and language code. Not set
force Yes Forced language which replace {{if lang}} Not set

Examples

{{LangFallback|Parts|force=ru}}

Parts → en

{{LangFallback|Parts}}

Parts