Difference between revisions of "Template:Flag"
m (Unknown --> PlaceholderFlag) |
m (Removed link to categories - if this should be reverted leave a message in the discussion first) |
||
Line 1: | Line 1: | ||
− | <includeonly>[[Image:{{Flag/Terms|{{{1|}}}}}.png|23x15px|border|{{Flag/Terms|{{{1|}}}}} | + | <includeonly>[[Image:{{Flag/Terms|{{{1|}}}}}.png|23x15px|border|{{Flag/Terms|{{{1|}}}}}|link=]]{{#ifeq:{{Flag/Terms|{{{1|}}}}}|PlaceholderFlag|[[Category:Unrecognised Flag]]|}}</includeonly><noinclude>{{documentation}}[[Category:Template]]</noinclude> |
Revision as of 05:09, 19 March 2016
(view - edit) Documentation
Template:Flag displays a flag icon.
Usage
{{flag|1}}
1
This is the only parameter in the template and is used for defining which country's flag will be shown.
- All valid settings for flags are listed in the tables below
- This parameter is case-insensitive.
Examples
You type | You get | |
---|---|---|
Full name | {{flag|United Nations}}
|
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] |
Alternate name | {{flag|world}}
|
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] |
Abbreviation | {{flag|un}}
|
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] |
No parameter | {{flag|}}
|
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] |
Invalid parameter | {{flag|invalid}}
|
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] |
Valid settings
Note: United Kingdom flags
The individual flags of [[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] England, [[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] Northern Ireland, [[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] Scotland, and [[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] Wales should take preference in all possible circumstances over the [[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] United Kingdom flag.
Misc · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z |
Miscellaneous
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | asean
|
ASEAN |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ukus
|
English Language |
usuk
| ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | eu
|
Europe |
European Union | ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | nam
|
North America |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | aunz
|
Australasia |
Oceania | ||
Australia/New Zealand | ||
nzau
|
New Zealand/Australia | |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | sam
|
South America |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | un
|
United Nations |
Global | ||
International | ||
World | ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] |
|
Unknown |
A
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | af
|
Afghanistan |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | al
|
Albania |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | dz
|
Algeria |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ad
|
Andorra |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ao
|
Angola |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ag
|
Antigua and Barbuda |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ar
|
Argentina |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | am
|
Armenia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | au
|
Australia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | at
|
Austria |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | az
|
Azerbaijan |
B
C
D
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | cd
|
Democratic Republic of the Congo |
Zaire | ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | dk
|
Denmark |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | dj
|
Djibouti |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | dm
|
Dominica |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | do
|
Dominican Republic |
E
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tl
|
East Timor |
Timor-Leste | ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ec
|
Ecuador |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | eg
|
Egypt |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | sv
|
El Salvador |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | uken
|
England |
en
| ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | gq
|
Equatorial Guinea |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | er
|
Eritrea |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ee
|
Estonia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | sz
|
Eswatini |
Swaziland | ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | et
|
Ethiopia |
F
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | fj
|
Fiji |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | fi
|
Finland |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | fr
|
France |
G
H
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ht
|
Haiti |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | hn
|
Honduras |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | hk
|
Hong Kong |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | hu
|
Hungary |
I
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | is
|
Iceland |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | in
|
India |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | id
|
Indonesia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ir
|
Iran |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | iq
|
Iraq |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ie
|
Ireland |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | il
|
Israel |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | it
|
Italy |
J
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | jm
|
Jamaica |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | jp
|
Japan |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | jo
|
Jordan |
K
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | kz
|
Kazakhstan |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ke
|
Kenya |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ki
|
Kiribati |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | xk
|
Kosovo |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | kw
|
Kuwait |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | kg
|
Kyrgyzstan |
L
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | la
|
Laos |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | lv
|
Latvia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | lb
|
Lebanon |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ls
|
Lesotho |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | lr
|
Liberia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ly
|
Libya |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | li
|
Liechtenstein |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | lt
|
Lithuania |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | lu
|
Luxembourg |
M
N
O
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | om
|
Oman |
P
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | pk
|
Pakistan |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | pw
|
Palau |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ps
|
Palestine |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | pa
|
Panama |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | pg
|
Papua New Guinea |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | py
|
Paraguay |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | pe
|
Peru |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ph
|
Philippines |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | pl
|
Poland |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | pt
|
Portugal |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | pr
|
Puerto Rico |
Q
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | qa
|
Qatar |
R
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | cg
|
Republic of the Congo |
Congo | ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ro
|
Romania |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ru
|
Russia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | rw
|
Rwanda |
S
T
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tw
|
Taiwan |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tj
|
Tajikistan |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tz
|
Tanzania |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | th
|
Thailand |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tg
|
Togo |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | to
|
Tonga |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tt
|
Trinidad and Tobago |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tn
|
Tunisia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tr
|
Turkey |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tm
|
Turkmenistan |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | tv
|
Tuvalu |
U
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ug
|
Uganda |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ua
|
Ukraine |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ae
|
United Arab Emirates |
uae
| ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | uk
|
United Kingdom |
gb
|
Britain | |
Great Britain | ||
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | us
|
United States |
usa
|
United States of America | |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | uy
|
Uruguay |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | uz
|
Uzbekistan |
V
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | vu
|
Vanuatu |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | va
|
Vatican City |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ve
|
Venezuela |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | vn
|
Vietnam |
W
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | wa
|
Wales |
ukwa
|
X
Y
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | ye
|
Yemen |
Z
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | zm
|
Zambia |
[[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]] | zw
|
Zimbabwe |
Developer documentation
How this template works
- Template:Flag takes the input parameter and calls a sub-template at "Template:Flag/X". For example,
{{flag|united nations}}
will call Template:Flag/united nations. - This sub-template then in turn calls Template:Flag icon, supplying it with a single parameter (
{{Flag icon|X}}
). For example, Template:Flag/united nations supplies Template:Flag icon with the single parameterUnited Nations
- Template:Flag icon calls for a flag image at "File:Flag of X.png", and applies formatting such as sizing and a 1px border. For example, if Template:Flag icon is given the parameter
United Nations
, it will supply File:Flag of United Nations.png ([[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]]).
- Many of the sub-templates (such as the abbreviations and alternate names) are simple redirects to a primary sub-template. For example, Template:Flag/un, Template:Flag/global, Template:Flag/international and Template:Flag/world all redirect to Template:Flag/united nations. Template:Flag/united nations is the primary sub-template which then calls Template:Flag icon.
How to add a flag
If you wish to add a flag, the following requirements must be followed:
Image size
- Width: equal or less than 23px
- Height: equal or less than 15px
- Aspect ratio: retained from source flag
If your flag is a custom flag (e.g. [[Image:Template:Flag/Terms.png|23x15px|border|Template:Flag/Terms|link=]]), we recommend a 23x15px flag which has a 2:3 ratio.
Upload
- Your flag should be uploaded to
File:Flag of ProperFlagName.png
, whereProperFlagName
is the full name of your flag with correct capitalization - Make sure you add your flag image to Category:Flag Images.
Update templates
- Create a template at
Template:Flag/lowercaseflagname
, wherelowercaseflagname
is the full name of your flag in complete lowercase. This template should contain the code below:
{{Flag icon|'''ProperFlagName'''}}<noinclude>[[Category:Flag sub-templates]]</noinclude>
- Create a template at
Template:Flag/abbr
, whereabbr
is the lowercase abbreviation of your flag. This template should be a simple redirect to the primary sub-template (Template:Flag/lowercaseflagname
)- If your template has any alternate names or abbreviations, create them as simple redirects to the primary sub-template as well
- Add your flag to the correct table in the documentation template.