Template:Flag: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{filepath:{{{1|English}}}.png}}{{#ifexist: {{{2}}}|{{sp}}{{#switch: {{{2}}}|show={{{1|English}}}|{{{2}}}|}}}}<noinclude>
{{filepath:{{{1|English}}}.png}}{{#switch:{{{2|}}}
|show={{sp}}{{{1|English}}}
|=
|{{sp}}{{{2}}}}}<noinclude>
{{prot-temp}}
{{prot-temp}}
{{DisplayBox|text=
{{DisplayBox|text=
Line 6: Line 9:
For example,
For example,
<pre>{{flag|Latvian}}</pre>
<pre>{{flag|Latvian}}</pre>
displays
displays the Latvian flag
:{{flag|Latvian}}
:{{flag|Latvian}}
(the Latvian flag).
 
If the first (language) parameter is omitted, then
If the first (language) parameter is omitted, then
<pre>{{flag}}</pre>
<pre>{{flag}}</pre>
displays
displays the English language flag by default
:{{flag}}
:{{flag}}
(the English language flag) by default.


'''Optionally:''' one may add a second parameter:
'''Optionally:''' one may add a second parameter:

Revision as of 17:28, 9 January 2009

English.png

Usage: The normal syntax is:

{{flag|<language>}}

For example,

{{flag|Latvian}}

displays the Latvian flag

Latvian.png

If the first (language) parameter is omitted, then

{{flag}}

displays the English language flag by default

English.png

Optionally: one may add a second parameter:

{{flag|Norwegian|show}}

to make "Norwegian" appear after the flag, as in

Norwegian.png Norwegian

Alternatively,

{{flag|Norwegian|but my parents were really Swedish!}}

produces

Norwegian.png but my parents were really Swedish!