Template:Flag: Difference between revisions

From ChoralWiki
Jump to navigation Jump to search
m (Protected "Template:Flag" [edit=sysop:move=sysop])
(add some functionality)
Line 1: Line 1:
{{filepath:{{{1|English}}}.png}}<noinclude>
{{filepath:{{{1|English}}}.png}}{{#ifexist: {{{2}}}|{{sp}}{{#switch: {{{2}}}|show={{{1|English}}}|{{{2}}}}}|}}<noinclude>
{{prot-temp}}
{{prot-temp}}
{{DisplayBox|text=
{{DisplayBox|text=
'''Usage:'''
'''Usage:''' The normal syntax is:
<pre>{{flag|<language>}}</pre>
For example,
<pre>{{flag|Latvian}}</pre>
<pre>{{flag|Latvian}}</pre>
displays {{flag|Latvian}} (the Latvian flag).
displays
:{{flag|Latvian}}
(the Latvian flag).
If the first (language) parameter is omitted, then
<pre>{{flag}}</pre>
<pre>{{flag}}</pre>
displays {{flag}} (the English language flag) by default.
displays
:{{flag}}
(the English language flag) by default.
 
'''Optionally:''' one may add a second parameter:
<pre>{{flag|Norwegian|show}}</pre>
to make "Norwegian" appear after the flag, as in
:{{flag|Norwegian|show}}
Alternatively,
<pre>{{flag|Norwegian|but my parents were really Swedish!}}</pre>
produces
:{{flag|Norwegian|but my parents were really Swedish!}}
}}
}}
[[Category:Templates|{{PAGENAME}}]]
[[Category:Templates|{{PAGENAME}}]]
</noinclude>
</noinclude>

Revision as of 16:40, 9 January 2009

English.png

Usage: The normal syntax is:

{{flag|<language>}}

For example,

{{flag|Latvian}}

displays

Latvian.png

(the Latvian flag). If the first (language) parameter is omitted, then

{{flag}}

displays

English.png

(the English language flag) by default.

Optionally: one may add a second parameter:

{{flag|Norwegian|show}}

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

Norwegian.png

Alternatively,

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

produces

Norwegian.png