Editing Template:Flag/doc

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page is not enabled for semantic in-text annotations due to namespace restrictions. Details about how to enable the namespace can be found on the configuration help page.

Latest revision Your text
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Template:Flag''' displays a flag icon.
+
'''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 ==
 
== Usage ==
<code><nowiki>{{flag|</nowiki>'''<nowiki>1</nowiki>'''<nowiki>}}</nowiki></code>
+
<code><nowiki>{{flag|</nowiki>'''<nowiki>name</nowiki>'''<nowiki>}}</nowiki></code>
=== 1 ===
+
=== name ===
This is the only parameter in the template and is used for defining which country's flag will be shown.
+
This is the only parameter in the template and is used for defining which country's information should be used.
* All valid settings for flags are listed in the tables below
+
*The data entered here will provide the icon with its image and caption/tool tip text.
* This parameter is case-insensitive.
+
*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, {{flag}}. This is used to keep alignment proper in other templates or to indicate an unknown country.
 
== Examples ==
 
== Examples ==
{| class="wikitable" style="text-align: center;"
+
{| class="wikitable" style="text-align: center; cell-padding: em;"
  | style="background-color:#ecfcf4;border-top:hidden;border-left:hidden" |
+
  ! style="color: white; background-color: #1c1c1c" colspan=3 | You type
! You type
+
  ! style="color: white; background-color: #1c1c1c" colspan=3 | You get
  ! You get
 
 
|-
 
|-
  ! style="font-weight:normal" | ''Full name''
+
  | style="border-right:hidden" |
  | <code><nowiki>{{flag|United Nations}}</nowiki></code>
+
  | <code><nowiki>{{flag|antarctica}}</nowiki></code>
  | {{flag|United Nations}}
+
| style="border-left:hidden" |
 +
| style="border-right:hidden" |
 +
  | {{flag|antarctica}}
 +
| style="border-left:hidden" |
 
|-
 
|-
  ! style="font-weight:normal" | ''Alternate name''
+
  | style="border-right:hidden" |
  | <code><nowiki>{{flag|world}}</nowiki></code>
+
  | <code><nowiki>{{flag|aq}}</nowiki></code>
  | {{flag|world}}
+
| style="border-left:hidden" |
 +
| style="border-right:hidden" |
 +
  | {{flag|aq}}
 +
| style="border-left:hidden" |
 
|-
 
|-
  ! style="font-weight:normal" | ''Abbreviation''
+
  | style="border-right:hidden" |
| <code><nowiki>{{flag|un}}</nowiki></code>
 
| {{flag|un}}
 
|-
 
! style="font-weight:normal" | ''No parameter''
 
| <code><nowiki>{{flag|}}</nowiki></code>
 
| {{flag|}}
 
|-
 
! style="font-weight:normal" | ''Invalid parameter''
 
 
  | <code><nowiki>{{flag|invalid}}</nowiki></code>
 
  | <code><nowiki>{{flag|invalid}}</nowiki></code>
 +
| style="border-left:hidden" |
 +
| style="border-right:hidden" |
 
  | {{flag|invalid}}
 
  | {{flag|invalid}}
 +
| style="border-left:hidden" |
 
|}
 
|}
 
== Valid settings ==
 
== Valid settings ==
=== Note: United Kingdom flags ===
+
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 [https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements here].
The individual flags of {{flag|uken}} England, {{flag|ukni}} Northern Ireland, {{flag|uksc}} Scotland, and {{flag|ukwa}} Wales should take preference in '''all possible circumstances''' over the {{flag|uk}} United Kingdom flag.
+
{{box|start|padding=4em}}
 +
=== Alternate names ===
 +
These names are additional to those listed in the tables.
 +
*{{flag|aunz}} Australasia: <code>oceania</code>
 +
*{{flag|bs}} The Bahamas: <code>bahamas</code>
 +
*{{flag|cv}} Cape Verde: <code>cabo verde</code>
 +
*{{flag|tl}} East Timor: <code>timor-leste</code>
 +
*{{flag|ga}} Gambia: <code>the gambia</code>
 +
*{{flag|ci}} Ivory Coast: <code>cote d'ivoire</code>
 +
*{{flag|mo}} Macau: <code>macao</code>
 +
*{{flag|pn}} Pitcairn: <code>pitcairn islands</code>
 +
*{{flag|un}} United Nations: <code>global</code>, <code>international</code>, <code>world</code>
 +
*{{flag|us}} United States: <code>united states of america</code>
 +
{{box|break|padding=4em}}
 +
 
 +
=== Alternate abbreviations ===
 +
These abbreviations are additional to those listed in the tables.
 +
*{{flag|en}} England: <code>en</code>
 +
*{{flag|usuk}} English Language: <code>ukus</code>
 +
*{{flag|rsa}} South Africa: <code>rsa</code>
 +
*{{flag|ae}} United Arab Emirates: <code>uae</code>
 +
*{{flag|uk}} United Kingdom: <code>gb</code>
 +
*{{flag|us}} United States: <code>usa</code>
 +
*{{flag|wa}} Wales: <code>wa</code>
 +
{{box|break}}
 +
<div style="display:inline-block; width:500px;">
 +
 
 +
=== {{flag|uken}} {{flag|ukni}} {{flag|uksc}} {{flag|ukwa}} <small>vs.</small> {{flag|uk}} ===
 +
The individual flags of '''{{flag|uken}} England''', '''{{flag|ukni}} Northern Ireland''', '''{{flag|uksc}} Scotland''', and '''{{flag|ukwa}} Wales''' should take preference in all possible circumstances over the '''{{flag|uk}} United Kingdom''' flag.
 +
</div>
 +
{{box|end}}
 
{| class=wikitable style="width: 100%; text-align: center;"
 
{| class=wikitable style="width: 100%; text-align: center;"
|[[Template:Flag#Miscellaneous | Misc]] · [[Template:Flag#A | A]] · [[Template:Flag#B | B]] · [[Template:Flag#C | C]] · [[Template:Flag#D | D]] · [[Template:Flag#E | E]] · [[Template:Flag#F | F]] · [[Template:Flag#G | G]] · [[Template:Flag#H | H]] · [[Template:Flag#I | I]] · [[Template:Flag#J | J]] · [[Template:Flag#K | K]] · [[Template:Flag#L | L]] · [[Template:Flag#M | M]] · [[Template:Flag#N | N]] · [[Template:Flag#O | O]] · [[Template:Flag#P | P]] · [[Template:Flag#Q | Q]] · [[Template:Flag#R | R]] · [[Template:Flag#S | S]] · [[Template:Flag#T | T]] · [[Template:Flag#U | U]] · [[Template:Flag#V | V]] · [[Template:Flag#W | W]] · [[Template:Flag#X | X]] · [[Template:Flag#Y | Y]] · [[Template:Flag#Z | Z]]
+
|[[Template:Flag#A | A]] · [[Template:Flag#B | B]] · [[Template:Flag#C | C]] · [[Template:Flag#D | D]] · [[Template:Flag#E | E]] · [[Template:Flag#F | F]] · [[Template:Flag#G | G]] · [[Template:Flag#H | H]] · [[Template:Flag#I | I]] · [[Template:Flag#J | J]] · [[Template:Flag#K | K]] · [[Template:Flag#L | L]] · [[Template:Flag#M | M]] · [[Template:Flag#N | N]] · [[Template:Flag#O | O]] · [[Template:Flag#P | P]] · [[Template:Flag#Q | Q]] · [[Template:Flag#R | R]] · [[Template:Flag#S | S]] · [[Template:Flag#T | T]] · [[Template:Flag#U | U]] · [[Template:Flag#V | V]] · [[Template:Flag#W | W]] · [[Template:Flag#X | X]] · [[Template:Flag#Y | Y]] · [[Template:Flag#Z | Z]]
 
|}
 
|}
 
{{Box|start|padding=1em}}
 
{{Box|start|padding=1em}}
=== Miscellaneous ===
 
{| class="wikitable" style="text-align: center;"
 
|-
 
| style="width: 29px;" | {{flag|asean}}
 
| style="width: 44px;" | [[Template:Flag/asean|<code>asean</code>]]
 
| style="width: 160px;" | [[Template:Flag/asean|ASEAN]]
 
|-
 
| rowspan=2 | {{flag|ukus}}
 
| [[Template:Flag/ukus|<code>ukus</code>]]
 
| rowspan=2 | [[Template:Flag/english language|English Language]]
 
|-
 
| [[Template:Flag/usuk|<code>usuk</code>]]
 
|-
 
| rowspan=2 | {{flag|eu}}
 
| rowspan=2 | [[Template:Flag/eu|<code>eu</code>]]
 
| [[Template:Flag/europe|Europe]]
 
|-
 
| [[Template:Flag/european union|European Union]]
 
|-
 
| {{flag|nam}}
 
| [[Template:Flag/nam|<code>nam</code>]]
 
| [[Template:Flag/north america|North America]]
 
|-
 
| rowspan=4 | {{flag|aunz}}
 
| rowspan=3 | [[Template:Flag/aunz|<code>aunz</code>]]
 
| [[Template:Flag/australasia|Australasia]]
 
|-
 
| [[Template:Flag/oceania|Oceania]]
 
|-
 
| [[Template:Flag/australia/new zealand|Australia/New Zealand]]
 
|-
 
| [[Template:Flag/nzau|<code>nzau</code>]]
 
| [[Template:Flag/new zealand/australia|New Zealand/Australia]]
 
|-
 
| {{flag|sam}}
 
| [[Template:Flag/sam|<code>sam</code>]]
 
| [[Template:Flag/south america|South America]]
 
|-
 
| rowspan=4 | {{flag|un}}
 
| rowspan=4 | [[Template:Flag/un|<code>un</code>]]
 
| [[Template:Flag/united nations|United Nations]]
 
|-
 
| [[Template:Flag/global|Global]]
 
|-
 
| [[Template:Flag/international|International]]
 
|-
 
| [[Template:Flag/world|World]]
 
|-
 
| {{flag|}}
 
| [[Template:Flag/|<code></code>]]
 
| [[Template:Flag/unknown|Unknown]]
 
|}
 
{{Box|break|padding=1em}}
 
 
 
=== A ===
 
=== A ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
 
  | 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: 160px" | [[Template:Flag/afghanistan|Afghanistan]]
+
  | style="width: 150px" | [[Template:Flag/afghanistan|Afghanistan]]
 
|-
 
|-
 
  | {{flag|al}}
 
  | {{flag|al}}
Line 130: Line 108:
 
|-
 
|-
 
  | {{flag|au}}
 
  | {{flag|au}}
  | [[Template:Flag/|<code>au</code>]]
+
  | [[Template:Flag/<|<code>au</code>]]
 
  | [[Template:Flag/australia|Australia]]
 
  | [[Template:Flag/australia|Australia]]
 
|-
 
|-
Line 142: Line 120:
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== B ===
 
=== B ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
  | rowspan=2 style="width: 29px;" | {{flag|bs}}
+
  | style="width: 29px;" | {{flag|bs}}
  | rowspan=2 style="width: 44px;" | [[Template:Flag/bs|<code>bs</code>]]
+
  | style="width: 44px;" | [[Template:Flag/bs|<code>bs</code>]]
  | style="width: 160px;" | [[Template:Flag/bahamas|Bahamas]]
+
  | style="width: 150px;" | [[Template:Flag/bahamas|The Bahamas]]
|-
 
| [[Template:Flag/the bahamas|The Bahamas]]
 
 
|-
 
|-
 
  | {{flag|bh}}
 
  | {{flag|bh}}
Line 172: Line 147:
 
|-
 
|-
 
  | {{flag|bz}}
 
  | {{flag|bz}}
  | [[Template:Flag/bz|<code>bz</code>]]
+
  | [[Template:Flag/z|<code>bz</code>]]
 
  | [[Template:Flag/belize|Belize]]
 
  | [[Template:Flag/belize|Belize]]
 
|-
 
|-
Line 216: Line 191:
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== C ===
 
=== C ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
 
  | 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: 160px;" | [[Template:Flag/cambodia|Cambodia]]
+
  | style="width: 150px;" | [[Template:Flag/cambodia|Cambodia]]
 
|-
 
|-
 
  | {{flag|cm}}
 
  | {{flag|cm}}
Line 231: Line 205:
 
  | [[Template:Flag/canada|Canada]]
 
  | [[Template:Flag/canada|Canada]]
 
|-
 
|-
  | rowspan=2 | {{flag|cv}}
+
  | {{flag|cv}}
  | rowspan=2 | [[Template:Flag/cv|<code>cv</code>]]
+
  | [[Template:Flag/cv|<code>cv</code>]]
 
  | [[Template:Flag/cape verde|Cape Verde]]
 
  | [[Template:Flag/cape verde|Cape Verde]]
|-
 
| [[Template:Flag/cabo verde|Cabo Verde]]
 
 
|-
 
|-
 
  | {{flag|cf}}
 
  | {{flag|cf}}
 
  | [[Template:Flag/cf|<code>cf</code>]]
 
  | [[Template:Flag/cf|<code>cf</code>]]
  | [[Template:Flag/central african republic|Central African<br>Republic]]
+
  | [[Template:Flag/central african republic|Central African Republic]]
 
|-
 
|-
 
  | {{flag|td}}
 
  | {{flag|td}}
Line 260: Line 232:
 
  | [[Template:Flag/km|<code>km</code>]]
 
  | [[Template:Flag/km|<code>km</code>]]
 
  | [[Template:Flag/comoros|Comoros]]
 
  | [[Template:Flag/comoros|Comoros]]
 +
|-
 +
| {{flag|cd}}
 +
| [[Template:Flag/cd|<code>cd</code>]]
 +
| [[Template:Flag/democratic republic of the congo|Democratic Republic of the Congo]]
 +
|-
 +
| {{flag|cg}}
 +
| [[Template:Flag/cg|<code>cg</code>]]
 +
| [[Template:Flag/republic of the congo|Republic of the Congo]]
 
|-
 
|-
 
  | {{flag|cr}}
 
  | {{flag|cr}}
Line 277: Line 257:
 
  | [[Template:Flag/cyprus|Cyprus]]
 
  | [[Template:Flag/cyprus|Cyprus]]
 
|-
 
|-
  | rowspan=2 | {{flag|cz}}
+
  | {{flag|cz}}
  | rowspan=2 | [[Template:Flag/cz|<code>cz</code>]]
+
  | [[Template:Flag/cz|<code>cz</code>]]
 
  | [[Template:Flag/czech republic|Czech Republic]]
 
  | [[Template:Flag/czech republic|Czech Republic]]
 
|-
 
|-
  | [[Template:Flag/czechia|Czechia]]
+
  | {{flag|ci}}
|-
+
  | [[Template:Flag/ci|<code>ci</code>]]
| rowspan=2 | {{flag|ci}}
 
  | rowspan=2 | [[Template:Flag/ci|<code>ci</code>]]
 
 
  | [[Template:Flag/côte d'ivoire|Côte d'Ivoire]]
 
  | [[Template:Flag/côte d'ivoire|Côte d'Ivoire]]
|-
 
| [[Template:Flag/ivory coast|Ivory Coast]]
 
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== D ===
 
=== D ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
  | rowspan=2 style="width: 29px;" | {{flag|cd}}
+
  | style="width: 29px;" | {{flag|dk}}
  | rowspan=2 style="width: 44px;" | [[Template:Flag/cd|<code>cd</code>]]
+
  | style="width: 44px;" | [[Template:Flag/dk|<code>dk</code>]]
  | style="width: 160px;" | [[Template:Flag/democratic republic of the congo|Democratic Republic<br>of the Congo]]
+
  | style="width: 150px;" | [[Template:Flag/denmark|Denmark]]
|-
 
| [[Template:Flag/zaire|Zaire]]
 
|-
 
| {{flag|dk}}
 
| [[Template:Flag/dk|<code>dk</code>]]
 
| [[Template:Flag/denmark|Denmark]]
 
 
|-
 
|-
 
  | {{flag|dj}}
 
  | {{flag|dj}}
Line 319: Line 288:
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
 
|-
 
|-
  | rowspan=2 style="width: 29px;" | {{flag|tl}}
+
  | style="width: 29px;" | {{flag|tl}}
  | rowspan=2 style="width: 44px;" | [[Template:Flag/tl|<code>tl</code>]]
+
  | style="width: 44px;" | [[Template:Flag/tl|<code>tl</code>]]
  | style="width: 160px;" | [[Template:Flag/east timor|East Timor]]
+
  | style="width: 150px;" | [[Template:Flag/east timor|East Timor]]
|-
 
| [[Template:Flag/timor-leste|Timor-Leste]]
 
 
|-
 
|-
 
  | {{flag|ec}}
 
  | {{flag|ec}}
Line 337: Line 304:
 
  | [[Template:Flag/el salvador|El Salvador]]
 
  | [[Template:Flag/el salvador|El Salvador]]
 
|-
 
|-
  | rowspan=2 | {{flag|uken}}
+
  | {{flag|uken}}
 
  | [[Template:Flag/uken|<code>uken</code>]]
 
  | [[Template:Flag/uken|<code>uken</code>]]
  | rowspan=2 | [[Template:Flag/england|England]]
+
  | [[Template:Flag/england|England]]
|-
 
| [[Template:Flag/en|<code>en</code>]]
 
 
|-
 
|-
 
  | {{flag|gq}}
 
  | {{flag|gq}}
Line 355: Line 320:
 
  | [[Template:Flag/estonia|Estonia]]
 
  | [[Template:Flag/estonia|Estonia]]
 
|-
 
|-
  | rowspan=2 | {{flag|sz}}
+
  | {{flag|sz}}
  | rowspan=2 | [[Template:Flag/sz|<code>sz</code>]]
+
  | [[Template:Flag/sz|<code>sz</code>]]
 
  | [[Template:Flag/eswatini|Eswatini]]
 
  | [[Template:Flag/eswatini|Eswatini]]
|-
 
| [[Template:Flag/swaziland|Swaziland]]
 
 
|-
 
|-
 
  | {{flag|et}}
 
  | {{flag|et}}
 
  | [[Template:Flag/et|<code>et</code>]]
 
  | [[Template:Flag/et|<code>et</code>]]
 
  | [[Template:Flag/ethiopia|Ethiopia]]
 
  | [[Template:Flag/ethiopia|Ethiopia]]
 +
|-
 +
| {{flag|eu}}
 +
| [[Template:Flag/eu|<code>eu</code>]]
 +
| [[Template:Flag/europe|Europe]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== F ===
 
=== F ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
Line 372: Line 338:
 
  | 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: 160px;" | [[Template:Flag/fiji|Fiji]]
+
  | style="width: 150px;" | [[Template:Flag/fiji|Fiji]]
 
|-
 
|-
 
  | {{flag|fi}}
 
  | {{flag|fi}}
Line 388: Line 354:
 
  | 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: 160px;" | [[Template:Flag/gabon|Gabon]]
+
  | style="width: 150px;" | [[Template:Flag/gabon|Gabon]]
|-
 
| rowspan=2 | {{flag|gm}}
 
| rowspan=2 | [[Template:Flag/gm|<code>gm</code>]]
 
| [[Template:Flag/the gambia|The Gambia]]
 
 
|-
 
|-
 +
| {{flag|gm}}
 +
| [[Template:Flag/gm|<code>gm</code>]]
 
  | [[Template:Flag/gambia|Gambia]]
 
  | [[Template:Flag/gambia|Gambia]]
 
|-
 
|-
Line 437: Line 401:
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== H ===
 
=== H ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
Line 443: Line 406:
 
  | 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: 160px;" | [[Template:Flag/haiti|Haiti]]
+
  | style="width: 150px;" | [[Template:Flag/haiti|Haiti]]
 
|-
 
|-
 
  | {{flag|hn}}
 
  | {{flag|hn}}
Line 463: Line 426:
 
  | 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: 160px;" | [[Template:Flag/iceland|Iceland]]
+
  | style="width: 150px;" | [[Template:Flag/iceland|Iceland]]
 
|-
 
|-
 
  | {{flag|in}}
 
  | {{flag|in}}
Line 491: Line 454:
 
  | {{flag|it}}
 
  | {{flag|it}}
 
  | [[Template:Flag/it|<code>it</code>]]
 
  | [[Template:Flag/it|<code>it</code>]]
  | [[Template:Flag/italy|Italy]]
+
  | [[Template:Flag//italy|Italy]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
Line 499: Line 462:
 
  | 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: 160px;" | [[Template:Flag/jamaica|Jamaica]]
+
  | style="width: 150px;" | [[Template:Flag/jamaica|Jamaica]]
 
|-
 
|-
 
  | {{flag|jp}}
 
  | {{flag|jp}}
Line 515: Line 478:
 
  | 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: 160px;" | [[Template:Flag/kazakhstan|Kazakhstan]]
+
  | style="width: 150px;" | [[Template:Flag/kazakhstan|Kazakhstan]]
 
|-
 
|-
 
  | {{flag|ke}}
 
  | {{flag|ke}}
Line 530: Line 493:
 
|-
 
|-
 
  | {{flag|kw}}
 
  | {{flag|kw}}
  | [[Template:Flag/kw|<code>kw</code>]]
+
  | [[Template:Flag/>kw|<code>kw</code>]]
 
  | [[Template:Flag/kuwait|Kuwait]]
 
  | [[Template:Flag/kuwait|Kuwait]]
 
|-
 
|-
Line 543: Line 506:
 
  | 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: 160px;" | [[Template:Flag/laos|Laos]]
+
  | style="width: 150px;" | [[Template:Flag/laos|Laos]]
 
|-
 
|-
 
  | {{flag|lv}}
 
  | {{flag|lv}}
Line 580: Line 543:
 
=== M ===
 
=== M ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
|-
 
| rowspan=2 | {{flag|mo}}
 
| rowspan=2 | [[Template:Flag/mo|<code>mo</code>]]
 
| [[Template:Flag/macao|Macao]]
 
|-
 
| [[Template:Flag/macao|Macau]]
 
 
|-
 
|-
 
  | 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: 160px;" | [[Template:Flag/madagascar|Madagascar]]
+
  | style="width: 150px;" | [[Template:Flag/madagascar|Madagascar]]
 
|-
 
|-
 
  | {{flag|mw}}
 
  | {{flag|mw}}
Line 645: Line 602:
 
  | {{flag|me}}
 
  | {{flag|me}}
 
  | [[Template:Flag/me|<code>me</code>]]
 
  | [[Template:Flag/me|<code>me</code>]]
  | [[Template:Flag/montenegro|Montenegro]]
+
  | [[Template:Flag/montonegro|Montenegro]]
 
|-
 
|-
 
  | {{flag|ma}}
 
  | {{flag|ma}}
Line 660: Line 617:
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== N ===
 
=== N ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
Line 666: Line 622:
 
  | 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: 160px;" | [[Template:Flag/namibia|Namibia]]
+
  | style="width: 150px;" | [[Template:Flag/namibia|Namibia]]
 
|-
 
|-
 
  | {{flag|nr}}
 
  | {{flag|nr}}
Line 676: Line 632:
 
  | [[Template:Flag/nepal|Nepal]]
 
  | [[Template:Flag/nepal|Nepal]]
 
|-
 
|-
  | rowspan=2 | {{flag|nl}}
+
  | {{flag|nl}}
  | rowspan=2 | [[Template:Flag/nl|<code>nl</code>]]
+
  | [[Template:Flag/nl|<code>nl</code>]]
 
  | [[Template:Flag/netherlands|Netherlands]]
 
  | [[Template:Flag/netherlands|Netherlands]]
|-
 
| [[Template:Flag/holland|Holland]]
 
 
|-
 
|-
 
  | {{flag|nz}}
 
  | {{flag|nz}}
Line 702: Line 656:
 
  | [[Template:Flag/north korea|North Korea]]
 
  | [[Template:Flag/north korea|North Korea]]
 
|-
 
|-
  | rowspan=2 | {{flag|mk}}
+
  | {{flag|mk}}
  | rowspan=2 | [[Template:Flag/mk|<code>mk</code>]]
+
  | [[Template:Flag/mk|<code>mk</code>]]
| [[Template:Flag/macedonia|Macedonia]]
 
|-
 
 
  | [[Template:Flag/north macedonia|North Macedonia]]
 
  | [[Template:Flag/north macedonia|North Macedonia]]
 
|-
 
|-
Line 717: Line 669:
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== O ===
 
=== O ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
Line 723: Line 674:
 
  | 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: 160px;" | [[Template:Flag/oman|Oman]]
+
  | style="width: 150px;" | [[Template:Flag/oman|Oman]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
Line 731: Line 682:
 
  | 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: 160px;" | [[Template:Flag/pakistan|Pakistan]]
+
  | style="width: 150px;" | [[Template:Flag/pakistan|Pakistan]]
 
|-
 
|-
 
  | {{flag|pw}}
 
  | {{flag|pw}}
Line 779: Line 730:
 
  | 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: 160px;" | [[Template:Flag/qatar|Qatar]]
+
  | style="width: 150px;" | [[Template:Flag/qatar|Qatar]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
Line 785: Line 736:
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
 
|-
 
|-
  | rowspan=2 style="width: 29px;" | {{flag|cg}}
+
  | style="width: 29px;" | {{flag|ro}}
  | rowspan=2 style="width: 44px;" | [[Template:Flag/cg|<code>cg</code>]]
+
  | style="width: 44px;" | [[Template:Flag/|<code>ro</code>]]
  | style="width: 160px;" | [[Template:Flag/republic of the congo|Republic of the Congo]]
+
  | style="width: 150px;" | [[Template:Flag/romania|Romania]]
|-
 
| [[Template:Flag/congo|Congo]]
 
|-
 
| {{flag|ro}}
 
| [[Template:Flag/ro|<code>ro</code>]]
 
| [[Template:Flag/romania|Romania]]
 
 
|-
 
|-
 
  | {{flag|ru}}
 
  | {{flag|ru}}
Line 804: Line 749:
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== S ===
 
=== S ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
Line 810: Line 754:
 
  | 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: 160px;" | [[Template:Flag/saint kitts and nevis|Saint Kitts and Nevis]]
+
  | style="width: 150px;" | [[Template:Flag/saint kitts and nevis|Saint Kitts and Nevis]]
 
|-
 
|-
 
  | {{flag|lc}}
 
  | {{flag|lc}}
Line 818: Line 762:
 
  | {{flag|vc}}
 
  | {{flag|vc}}
 
  | [[Template:Flag/vc|<code>vc</code>]]
 
  | [[Template:Flag/vc|<code>vc</code>]]
  | [[Template:Flag/saint vincent and the grenadines|Saint Vincent<br>and the Grenadines]]
+
  | [[Template:Flag/saint vincent and the grenadines|Saint Vincent and the Grenadines]]
 
|-
 
|-
 
  | {{flag|ws}}
 
  | {{flag|ws}}
 
  | [[Template:Flag/ws|<code>ws</code>]]
 
  | [[Template:Flag/ws|<code>ws</code>]]
  | [[Template:Flag/samoa|Samoa]]
+
  | [[Template:Flag/amoa|Samoa]]
 
|-
 
|-
 
  | {{flag|sm}}
 
  | {{flag|sm}}
Line 854: Line 798:
 
  | {{flag|sl}}
 
  | {{flag|sl}}
 
  | [[Template:Flag/sl|<code>sl</code>]]
 
  | [[Template:Flag/sl|<code>sl</code>]]
  | [[Template:Flag/sierra leone|Sierra Leone]]
+
  | [[Template:Flag/ierra leone|Sierra Leone]]
 
|-
 
|-
 
  | {{flag|sg}}
 
  | {{flag|sg}}
Line 876: Line 820:
 
  | [[Template:Flag/somalia|Somalia]]
 
  | [[Template:Flag/somalia|Somalia]]
 
|-
 
|-
  | rowspan=2 | {{flag|za}}
+
  | {{flag|za}}
 
  | [[Template:Flag/za|<code>za</code>]]
 
  | [[Template:Flag/za|<code>za</code>]]
  | rowspan=2 | [[Template:Flag/south africa|South Africa]]
+
  | [[Template:Flag/south africa|South Africa]]
 
|-
 
|-
  | [[Template:Flag/rsa|<code>rsa</code>]]
+
| {{flag|sam}}
 +
  | [[Template:Flag/sam|<code>sam</code>]]
 +
| [[Template:Flag/south america|South America]]
 
|-
 
|-
 
  | {{flag|kr}}
 
  | {{flag|kr}}
Line 919: Line 865:
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== T ===
 
=== T ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
Line 925: Line 870:
 
  | 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: 160px;" | [[Template:Flag/taiwan|Taiwan]]
+
  | style="width: 150px;" | [[Template:Flag/taiwan|Taiwan]]
 
|-
 
|-
 
  | {{flag|tj}}
 
  | {{flag|tj}}
Line 973: Line 918:
 
  | 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: 160px;" | [[Template:Flag/uganda|Uganda]]
+
  | style="width: 150px;" | [[Template:Flag/uganda|Uganda]]
 
|-
 
|-
 
  | {{flag|ua}}
 
  | {{flag|ua}}
Line 979: Line 924:
 
  | [[Template:Flag/ukraine|Ukraine]]
 
  | [[Template:Flag/ukraine|Ukraine]]
 
|-
 
|-
  | rowspan=2 | {{flag|ae}}
+
  | {{flag|ae}}
 
  | [[Template:Flag/ae|<code>ae</code>]]
 
  | [[Template:Flag/ae|<code>ae</code>]]
  | rowspan=2 | [[Template:Flag/united arab emirates|United Arab Emirates]]
+
  | [[Template:Flag/united arab emirates|United Arab Emirates]]
|-
 
| [[Template:Flag/uae|<code>uae</code>]]
 
 
|-
 
|-
  | rowspan=3 | {{flag|uk}}
+
  | {{flag|uk}}
 
  | [[Template:Flag/uk|<code>uk</code>]]
 
  | [[Template:Flag/uk|<code>uk</code>]]
 
  | [[Template:Flag/united kingdom|United Kingdom]]
 
  | [[Template:Flag/united kingdom|United Kingdom]]
 
|-
 
|-
  | rowspan=2 | [[Template:Flag/gb|<code>gb</code>]]
+
  | {{flag|us}}
| [[Template:Flag/britain|Britain]]
 
|-
 
| [[Template:Flag/great britain|Great Britain]]
 
|-
 
| rowspan=2 | {{flag|us}}
 
 
  | [[Template:Flag/us|<code>us</code>]]
 
  | [[Template:Flag/us|<code>us</code>]]
 
  | [[Template:Flag/united states|United States]]
 
  | [[Template:Flag/united states|United States]]
|-
 
| [[Template:Flag/usa|<code>usa</code>]]
 
| [[Template:Flag/united states of america|United States of America]]
 
 
|-
 
|-
 
  | {{flag|uy}}
 
  | {{flag|uy}}
Line 1,010: Line 945:
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== V ===
 
=== V ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
Line 1,016: Line 950:
 
  | 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: 160px;" | [[Template:Flag/vanuatu|Vanuatu]]
+
  | style="width: 150px;" | [[Template:Flag/vanuatu|Vanuatu]]
 
|-
 
|-
 
  | {{flag|va}}
 
  | {{flag|va}}
Line 1,034: Line 968:
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
 
|-
 
|-
  | rowspan=2 style="width: 29px;" | {{flag|ukwa}}
+
  | style="width: 29px;" | {{flag|ukwa}}
  | style="width: 44px;" | [[Template:Flag/wa|<code>wa</code>]]
+
  | style="width: 44px;" | [[Template:Flag/ukwa|<code>ukwa</code>]]
  | rowspan=2 style="width: 160px;" | [[Template:Flag/wales|Wales]]
+
  | style="width: 150px;" | [[Template:Flag/wales|Wales]]
|-
 
| [[Template:Flag/ukwa|<code>ukwa</code>]]
 
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== X ===
 
=== X ===
<div style="width:273px"></div><!-- Div to keep tables aligned. Delete this if adding a table -->
 
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
 
=== Y ===
 
=== Y ===
 
{| class="wikitable" style="text-align: center;"
 
{| class="wikitable" style="text-align: center;"
Line 1,051: Line 980:
 
  | 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: 160px;" | [[Template:Flag/yemen|Yemen]]
+
  | style="width: 150px;" | [[Template:Flag/yemen|Yemen]]
 
|}
 
|}
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
Line 1,059: Line 988:
 
  | 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: 160px;" | [[Template:Flag/zambia|Zambia]]
+
  | style="width: 150px;" | [[Template:Flag/|Zambia]]
 
|-
 
|-
 
  | {{flag|zw}}
 
  | {{flag|zw}}
 
  | [[Template:Flag/zw|<code>zw</code>]]
 
  | [[Template:Flag/zw|<code>zw</code>]]
  | [[Template:Flag/zimbabwe|Zimbabwe]]
+
  | [[Template:Flag/|Zimbabwe]]
 
|}
 
|}
 
{{Box|end}}
 
{{Box|end}}
  
== Developer documentation ==
 
=== How this template works ===
 
# '''Template:Flag''' takes the input parameter and calls a sub-template at "Template:Flag/X". For example, <code><nowiki>{{flag|united nations}}</nowiki></code> will call [[Template:Flag/united nations]].
 
# This sub-template then in turn calls [[Template:Flag icon]], supplying it with a single parameter (<code><nowiki>{{Flag icon|X}}</nowiki></code>). For example, Template:Flag/united nations supplies Template:Flag icon with the single parameter <code>United Nations</code>
 
# 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 <code>United Nations</code>, it will supply [[:File:Flag of United Nations.png]] ({{flag|un}}).
 
 
* 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 ===
+
== Adding a flag ==
If you wish to add a flag, the following requirements must be followed:
+
If you wish to add a flag, the following requirements must be followed
==== Image size ====
+
=== Image size ===
 
*Width: equal or less than 23px
 
*Width: equal or less than 23px
 
*Height: equal or less than 15px
 
*Height: equal or less than 15px
 
*Aspect ratio: retained from source flag
 
*Aspect ratio: retained from source flag
 
If your flag is a custom flag (e.g. {{flag|nam}}), we recommend a 23x15px flag which has a 2:3 ratio.
 
If your flag is a custom flag (e.g. {{flag|nam}}), we recommend a 23x15px flag which has a 2:3 ratio.
==== Upload ====
+
=== Upload ===
*Your flag should be uploaded to <Code>File:Flag of '''ProperFlagName'''.png</code>, where <code>'''ProperFlagName'''</code> is the full name of your flag with correct capitalization
+
*Your flag should be uploaded to <Code>File:Flag of <nowiki><fullflagname></nowiki>.png</code>
*Make sure you add your flag image to [[:Category:Flag Images]].
+
*Make sure you add your flag to [[:Category:Flag Images]]
==== Update templates ====
+
=== Update templates ===
*Create a template at <code>Template:Flag/'''lowercaseflagname'''</code>, where <code>'''lowercaseflagname'''</code> is the full name of your flag in complete lowercase. This template should contain the code below:
+
*[[Template:Flag/abbr]] controls abbreviations and flag names, add your flag with its appropriate abbreviation there
<pre><nowiki>{{Flag icon|</nowiki>'''ProperFlagName'''<nowiki>}}<noinclude>[[Category:Flag sub-templates]]</noinclude></nowiki></pre>
+
*Update the appropriate documentation template at Template:Flag/doc/''FirstLetterOfFullFlagName'' (e.g. [[Template:Flag/doc/s]] for Switzerland)
*Create a template at <code>Template:Flag/'''abbr'''</code>, where <code>abbr</code> is the lowercase abbreviation of your flag. This template should be a simple redirect to the primary sub-template (<code>Template:Flag/'''lowercaseflagname'''</code>)
+
 
**If your template has any alternate names or abbreviations, create them as simple redirects to the primary sub-template as well
+
<noinclude>[[Category:Flag Documentation Templates]]</noinclude>
*Add your flag to the correct table in the [[Template:Flag/doc|documentation template]].<noinclude>[[Category:Flag Documentation Templates]]</noinclude>
 

Please note that all contributions to comp.tf may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see comp.tf:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

Templates used on this page: