Difference between revisions of "Template:If lang"

From Team Fortress Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{#ifeq:{{SUBPAGENAME}}|{{BASEPAGENAME}}|{{{1|}}}|{{{2|/{{SUBPAGENAME}}}}}|}}<noinclude>
 
{{#ifeq:{{SUBPAGENAME}}|{{BASEPAGENAME}}|{{{1|}}}|{{{2|/{{SUBPAGENAME}}}}}|}}<noinclude>
* Provides an output if the page in question is a language subpage.
+
* If ''subpagename'' equals ''basepagename'', {{tl|if lang}} will output nothing.
* How it works: if the subpagename is equal to the basepagename (which is the case in English pages) then {{tl|if lang}} will output the contents of {{{1}}} (defaults to none).
+
* If ''subpagename'' equals ''ru'' or ''fr'', {{tl|if lang}} will output, by default, <code><nowiki>/{{SUBPAGENAME}}</nowiki></code>.
** If this fails to match, {{tl|if lang}} it will output {{{2}}} (defaults to <code><nowiki>/{{SUBPAGENAME}}</nowiki></code>).
+
* Parameters: {{{1}}} for English, {{{2}}} for language subpages.
  
 
[[Category:Language templates|If lang]]
 
[[Category:Language templates|If lang]]
 
</noinclude>
 
</noinclude>

Revision as of 06:03, 12 August 2010

  • If subpagename equals basepagename, {{if lang}} will output nothing.
  • If subpagename equals ru or fr, {{if lang}} will output, by default, /{{SUBPAGENAME}}.
  • Parameters: {{{1}}} for English, {{{2}}} for language subpages.