Difference between revisions of "Template:Flag/doc"

From comp.tf
Jump to navigation Jump to search
Line 77: Line 77:
 
  | style="width: 29px;" | {{flag|af}}
 
  | style="width: 29px;" | {{flag|af}}
 
  | style="width: 44px;" | [[Template:Flag/af|<code>af</code>]]
 
  | style="width: 44px;" | [[Template:Flag/af|<code>af</code>]]
  | style="width: 150px" | [[Template:Flag/afghanistan|Afghanistan]]
+
  | style="width: 160px" | [[Template:Flag/afghanistan|Afghanistan]]
 
|-
 
|-
 
  | {{flag|al}}
 
  | {{flag|al}}
Line 124: Line 124:
 
  | style="width: 29px;" | {{flag|bs}}
 
  | style="width: 29px;" | {{flag|bs}}
 
  | style="width: 44px;" | [[Template:Flag/bs|<code>bs</code>]]
 
  | style="width: 44px;" | [[Template:Flag/bs|<code>bs</code>]]
  | style="width: 150px;" | [[Template:Flag/bahamas|The Bahamas]]
+
  | style="width: 160px;" | [[Template:Flag/bahamas|The Bahamas]]
 
|-
 
|-
 
  | {{flag|bh}}
 
  | {{flag|bh}}
Line 195: Line 195:
 
  | style="width: 29px;" | {{flag|kh}}
 
  | style="width: 29px;" | {{flag|kh}}
 
  | style="width: 44px;" | [[Template:Flag/kh|<code>kh</code>]]
 
  | style="width: 44px;" | [[Template:Flag/kh|<code>kh</code>]]
  | style="width: 150px;" | [[Template:Flag/cambodia|Cambodia]]
+
  | style="width: 160px;" | [[Template:Flag/cambodia|Cambodia]]
 
|-
 
|-
 
  | {{flag|cm}}
 
  | {{flag|cm}}
Line 271: Line 271:
 
  | style="width: 29px;" | {{flag|dk}}
 
  | style="width: 29px;" | {{flag|dk}}
 
  | style="width: 44px;" | [[Template:Flag/dk|<code>dk</code>]]
 
  | style="width: 44px;" | [[Template:Flag/dk|<code>dk</code>]]
  | style="width: 150px;" | [[Template:Flag/denmark|Denmark]]
+
  | style="width: 160px;" | [[Template:Flag/denmark|Denmark]]
 
|-
 
|-
 
  | {{flag|dj}}
 
  | {{flag|dj}}
Line 291: Line 291:
 
  | style="width: 29px;" | {{flag|tl}}
 
  | style="width: 29px;" | {{flag|tl}}
 
  | style="width: 44px;" | [[Template:Flag/tl|<code>tl</code>]]
 
  | style="width: 44px;" | [[Template:Flag/tl|<code>tl</code>]]
  | style="width: 150px;" | [[Template:Flag/east timor|East Timor]]
+
  | style="width: 160px;" | [[Template:Flag/east timor|East Timor]]
 
|-
 
|-
 
  | {{flag|ec}}
 
  | {{flag|ec}}
Line 339: Line 339:
 
  | style="width: 29px;" | {{flag|fj}}
 
  | style="width: 29px;" | {{flag|fj}}
 
  | style="width: 44px;" | [[Template:Flag/fj|<code>fj</code>]]
 
  | style="width: 44px;" | [[Template:Flag/fj|<code>fj</code>]]
  | style="width: 150px;" | [[Template:Flag/fiji|Fiji]]
+
  | style="width: 160px;" | [[Template:Flag/fiji|Fiji]]
 
|-
 
|-
 
  | {{flag|fi}}
 
  | {{flag|fi}}
Line 355: Line 355:
 
  | style="width: 29px;" | {{flag|ga}}
 
  | style="width: 29px;" | {{flag|ga}}
 
  | style="width: 44px;" | [[Template:Flag/ga|<code>ga</code>]]
 
  | style="width: 44px;" | [[Template:Flag/ga|<code>ga</code>]]
  | style="width: 150px;" | [[Template:Flag/gabon|Gabon]]
+
  | style="width: 160px;" | [[Template:Flag/gabon|Gabon]]
 
|-
 
|-
 
  | {{flag|gm}}
 
  | {{flag|gm}}
Line 407: Line 407:
 
  | style="width: 29px;" | {{flag|ht}}
 
  | style="width: 29px;" | {{flag|ht}}
 
  | style="width: 44px;" | [[Template:Flag/ht|<code>ht</code>]]
 
  | style="width: 44px;" | [[Template:Flag/ht|<code>ht</code>]]
  | style="width: 150px;" | [[Template:Flag/haiti|Haiti]]
+
  | style="width: 160px;" | [[Template:Flag/haiti|Haiti]]
 
|-
 
|-
 
  | {{flag|hn}}
 
  | {{flag|hn}}
Line 427: Line 427:
 
  | style="width: 29px;" | {{flag|is}}
 
  | style="width: 29px;" | {{flag|is}}
 
  | style="width: 44px;" | [[Template:Flag/is|<code>is</code>]]
 
  | style="width: 44px;" | [[Template:Flag/is|<code>is</code>]]
  | style="width: 150px;" | [[Template:Flag/iceland|Iceland]]
+
  | style="width: 160px;" | [[Template:Flag/iceland|Iceland]]
 
|-
 
|-
 
  | {{flag|in}}
 
  | {{flag|in}}
Line 463: Line 463:
 
  | style="width: 29px;" | {{flag|jm}}
 
  | style="width: 29px;" | {{flag|jm}}
 
  | style="width: 44px;" | [[Template:Flag/jm|<code>jm</code>]]
 
  | style="width: 44px;" | [[Template:Flag/jm|<code>jm</code>]]
  | style="width: 150px;" | [[Template:Flag/jamaica|Jamaica]]
+
  | style="width: 160px;" | [[Template:Flag/jamaica|Jamaica]]
 
|-
 
|-
 
  | {{flag|jp}}
 
  | {{flag|jp}}
Line 479: Line 479:
 
  | style="width: 29px;" | {{flag|kz}}
 
  | style="width: 29px;" | {{flag|kz}}
 
  | style="width: 44px;" | [[Template:Flag/kz|<code>kz</code>]]
 
  | style="width: 44px;" | [[Template:Flag/kz|<code>kz</code>]]
  | style="width: 150px;" | [[Template:Flag/kazakhstan|Kazakhstan]]
+
  | style="width: 160px;" | [[Template:Flag/kazakhstan|Kazakhstan]]
 
|-
 
|-
 
  | {{flag|ke}}
 
  | {{flag|ke}}
Line 507: Line 507:
 
  | style="width: 29px;" | {{flag|la}}
 
  | style="width: 29px;" | {{flag|la}}
 
  | style="width: 44px;" | [[Template:Flag/la|<code>la</code>]]
 
  | style="width: 44px;" | [[Template:Flag/la|<code>la</code>]]
  | style="width: 150px;" | [[Template:Flag/laos|Laos]]
+
  | style="width: 160px;" | [[Template:Flag/laos|Laos]]
 
|-
 
|-
 
  | {{flag|lv}}
 
  | {{flag|lv}}
Line 547: Line 547:
 
  | style="width: 29px;" | {{flag|mg}}
 
  | style="width: 29px;" | {{flag|mg}}
 
  | style="width: 44px;" | [[Template:Flag/mg|<code>mg</code>]]
 
  | style="width: 44px;" | [[Template:Flag/mg|<code>mg</code>]]
  | style="width: 150px;" | [[Template:Flag/madagascar|Madagascar]]
+
  | style="width: 160px;" | [[Template:Flag/madagascar|Madagascar]]
 
|-
 
|-
 
  | {{flag|mw}}
 
  | {{flag|mw}}
Line 623: Line 623:
 
  | style="width: 29px;" | {{flag|na}}
 
  | style="width: 29px;" | {{flag|na}}
 
  | style="width: 44px;" | [[Template:Flag/na|<code>na</code>]]
 
  | style="width: 44px;" | [[Template:Flag/na|<code>na</code>]]
  | style="width: 150px;" | [[Template:Flag/namibia|Namibia]]
+
  | style="width: 160px;" | [[Template:Flag/namibia|Namibia]]
 
|-
 
|-
 
  | {{flag|nr}}
 
  | {{flag|nr}}
Line 675: Line 675:
 
  | style="width: 29px;" | {{flag|om}}
 
  | style="width: 29px;" | {{flag|om}}
 
  | style="width: 44px;" | [[Template:Flag/om|<code>om</code>]]
 
  | style="width: 44px;" | [[Template:Flag/om|<code>om</code>]]
  | style="width: 150px;" | [[Template:Flag/oman|Oman]]
+
  | style="width: 160px;" | [[Template:Flag/oman|Oman]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
Line 683: Line 683:
 
  | style="width: 29px;" | {{flag|pk}}
 
  | style="width: 29px;" | {{flag|pk}}
 
  | style="width: 44px;" | [[Template:Flag/pk|<code>pk</code>]]
 
  | style="width: 44px;" | [[Template:Flag/pk|<code>pk</code>]]
  | style="width: 150px;" | [[Template:Flag/pakistan|Pakistan]]
+
  | style="width: 160px;" | [[Template:Flag/pakistan|Pakistan]]
 
|-
 
|-
 
  | {{flag|pw}}
 
  | {{flag|pw}}
Line 731: Line 731:
 
  | style="width: 29px;" | {{flag|qa}}
 
  | style="width: 29px;" | {{flag|qa}}
 
  | style="width: 44px;" | [[Template:Flag/qa|<code>qa</code>]]
 
  | style="width: 44px;" | [[Template:Flag/qa|<code>qa</code>]]
  | style="width: 150px;" | [[Template:Flag/qatar|Qatar]]
+
  | style="width: 160px;" | [[Template:Flag/qatar|Qatar]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
Line 739: Line 739:
 
  | style="width: 29px;" | {{flag|ro}}
 
  | style="width: 29px;" | {{flag|ro}}
 
  | style="width: 44px;" | [[Template:Flag/|<code>ro</code>]]
 
  | style="width: 44px;" | [[Template:Flag/|<code>ro</code>]]
  | style="width: 150px;" | [[Template:Flag/romania|Romania]]
+
  | style="width: 160px;" | [[Template:Flag/romania|Romania]]
 
|-
 
|-
 
  | {{flag|ru}}
 
  | {{flag|ru}}
Line 755: Line 755:
 
  | style="width: 29px;" | {{flag|kn}}
 
  | style="width: 29px;" | {{flag|kn}}
 
  | style="width: 44px;" | [[Template:Flag/kn|<code>kn</code>]]
 
  | style="width: 44px;" | [[Template:Flag/kn|<code>kn</code>]]
  | style="width: 150px;" | [[Template:Flag/saint kitts and nevis|Saint Kitts and Nevis]]
+
  | style="width: 160px;" | [[Template:Flag/saint kitts and nevis|Saint Kitts and Nevis]]
 
|-
 
|-
 
  | {{flag|lc}}
 
  | {{flag|lc}}
Line 871: Line 871:
 
  | style="width: 29px;" | {{flag|tw}}
 
  | style="width: 29px;" | {{flag|tw}}
 
  | style="width: 44px;" | [[Template:Flag/tw|<code>tw</code>]]
 
  | style="width: 44px;" | [[Template:Flag/tw|<code>tw</code>]]
  | style="width: 150px;" | [[Template:Flag/taiwan|Taiwan]]
+
  | style="width: 160px;" | [[Template:Flag/taiwan|Taiwan]]
 
|-
 
|-
 
  | {{flag|tj}}
 
  | {{flag|tj}}
Line 919: Line 919:
 
  | style="width: 29px;" | {{flag|ug}}
 
  | style="width: 29px;" | {{flag|ug}}
 
  | style="width: 44px;" | [[Template:Flag/ug|<code>ug</code>]]
 
  | style="width: 44px;" | [[Template:Flag/ug|<code>ug</code>]]
  | style="width: 150px;" | [[Template:Flag/uganda|Uganda]]
+
  | style="width: 160px;" | [[Template:Flag/uganda|Uganda]]
 
|-
 
|-
 
  | {{flag|ua}}
 
  | {{flag|ua}}
Line 951: Line 951:
 
  | style="width: 29px;" | {{flag|vu}}
 
  | style="width: 29px;" | {{flag|vu}}
 
  | style="width: 44px;" | [[Template:Flag/vu|<code>vu</code>]]
 
  | style="width: 44px;" | [[Template:Flag/vu|<code>vu</code>]]
  | style="width: 150px;" | [[Template:Flag/vanuatu|Vanuatu]]
+
  | style="width: 160px;" | [[Template:Flag/vanuatu|Vanuatu]]
 
|-
 
|-
 
  | {{flag|va}}
 
  | {{flag|va}}
Line 971: Line 971:
 
  | style="width: 29px;" | {{flag|ukwa}}
 
  | style="width: 29px;" | {{flag|ukwa}}
 
  | style="width: 44px;" | [[Template:Flag/ukwa|<code>ukwa</code>]]
 
  | style="width: 44px;" | [[Template:Flag/ukwa|<code>ukwa</code>]]
  | style="width: 150px;" | [[Template:Flag/wales|Wales]]
+
  | style="width: 160px;" | [[Template:Flag/wales|Wales]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
Line 981: Line 981:
 
  | style="width: 29px;" | {{flag|ye}}
 
  | style="width: 29px;" | {{flag|ye}}
 
  | style="width: 44px;" | [[Template:Flag/ye|<code>ye</code>]]
 
  | style="width: 44px;" | [[Template:Flag/ye|<code>ye</code>]]
  | style="width: 150px;" | [[Template:Flag/yemen|Yemen]]
+
  | style="width: 160px;" | [[Template:Flag/yemen|Yemen]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
Line 989: Line 989:
 
  | style="width: 29px;" | {{flag|zm}}
 
  | style="width: 29px;" | {{flag|zm}}
 
  | style="width: 44px;" | [[Template:Flag/zm|<code>zm</code>]]
 
  | style="width: 44px;" | [[Template:Flag/zm|<code>zm</code>]]
  | style="width: 150px;" | [[Template:Flag/zambia|Zambia]]
+
  | style="width: 160px;" | [[Template:Flag/zambia|Zambia]]
 
|-
 
|-
 
  | {{flag|zw}}
 
  | {{flag|zw}}

Revision as of 14:58, 11 May 2020

Template:Flag displays a flag icon that is 15px high and bordered. This template is used in conjunction with Template:Flag/abbr, which defines the terms that can be used in this template. All of the flag images used in this template can be found at Category:Flag Images.

Usage

{{flag|name}}

name

This is the only parameter in the template and is used for defining which country's information should be used.

  • The data entered here will provide the icon with its image and caption/tool tip text.
  • Appropriate settings for this parameter are listed in the table below.
  • Any text entered should be fully lowercase.
  • Any special characters (å, é, ì, ô, ū) are not used as they conflict with the wiki's file retrieving system.
  • If there is no setting or the setting is invalid (i.e. not listed in the table below) the template will display a placeholder flag, Unknown. This is used to keep alignment proper in other templates or to indicate an unknown country.

Examples

You type You get
{{flag|antarctica}} Template:Flag/antarctica
{{flag|aq}} Template:Flag/aq
{{flag|invalid}} Template:Flag/invalid

Valid settings

A flag can be displayed by either using a country's two letter abbreviation, another name for the country, or the full name of the country in the name parameter. An alternate list of two letter abbreviations for countries can be found here.

Alternate names

These names are additional to those listed in the tables.

  • Oceania Australasia: oceania
  • The Bahamas The Bahamas: bahamas
  • Cape Verde Cape Verde: cabo verde
  • East Timor East Timor: timor-leste
  • Gabon Gambia: the gambia
  • Côte d'Ivoire Ivory Coast: cote d'ivoire
  • Macau Macau: macao
  • Template:Flag/pn Pitcairn: pitcairn islands
  • United Nations United Nations: global, international, world
  • United States United States: united states of america

Alternate abbreviations

These abbreviations are additional to those listed in the tables.

  • England England: en
  • English Language English Language: ukus
  • South Africa South Africa: rsa
  • United Arab Emirates United Arab Emirates: uae
  • United Kingdom United Kingdom: gb
  • United States United States: usa
  • Wales Wales: wa

England Northern Ireland Scotland Wales vs. United Kingdom

The individual flags of England England, Northern Ireland Northern Ireland, Scotland Scotland, and Wales Wales should take preference in all possible circumstances over the United Kingdom United Kingdom flag.

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

O

Oman om Oman

Q

Qatar qa Qatar

X

Y

Yemen ye Yemen


Adding 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. North America), we recommend a 23x15px flag which has a 2:3 ratio.

Upload

  • Your flag should be uploaded to File:Flag of <fullflagname>.png
  • Make sure you add your flag to Category:Flag Images

Update templates

  • Template:Flag/abbr controls abbreviations and flag names, add your flag with its appropriate abbreviation there
  • Update the appropriate documentation template at Template:Flag/doc/FirstLetterOfFullFlagName (e.g. Template:Flag/doc/s for Switzerland)