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> | + | <code><nowiki>{{flag|</nowiki>'''<nowiki>name</nowiki>'''<nowiki>}}</nowiki></code> |
− | === | + | === name === |
− | This is the only parameter in the template and is used for defining which country's | + | 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. |
− | * This | + | *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="color: white; background-color: #1c1c1c" colspan=3 | You type | |
− | + | ! style="color: white; background-color: #1c1c1c" colspan=3 | You get | |
− | |||
− | |||
− | ! style=" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
− | + | | style="border-right:hidden" | | |
− | | <code><nowiki>{{flag| | + | | <code><nowiki>{{flag|antarctica}}</nowiki></code> |
− | | {{flag| | + | | style="border-left:hidden" | |
+ | | style="border-right:hidden" | | ||
+ | | {{flag|antarctica}} | ||
+ | | style="border-left:hidden" | | ||
|- | |- | ||
− | + | | style="border-right:hidden" | | |
− | | <code><nowiki>{{flag|}}</nowiki></code> | + | | <code><nowiki>{{flag|aq}}</nowiki></code> |
− | | {{flag|}} | + | | style="border-left:hidden" | |
+ | | style="border-right:hidden" | | ||
+ | | {{flag|aq}} | ||
+ | | style="border-left:hidden" | | ||
|- | |- | ||
− | + | | style="border-right:hidden" | | |
| <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 == | ||
− | === | + | 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 | + | {{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#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]] | ||
Line 43: | Line 75: | ||
=== Miscellaneous === | === Miscellaneous === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
+ | | style="width: 29px;" | {{flag|aunz}} | ||
+ | | style="width: 44px;" | [[Template:Flag/aunz|<code>aunz</code>]] | ||
+ | | style="width: 160px" | [[Template:Flag/aunz|Australia/New Zealand]] | ||
|- | |- | ||
− | + | | {{flag|ukus}} | |
− | |||
− | |||
− | |||
− | |||
| [[Template:Flag/ukus|<code>ukus</code>]] | | [[Template:Flag/ukus|<code>ukus</code>]] | ||
− | + | | [[Template:Flag/english language|English Language]] | |
− | |||
− | |||
|- | |- | ||
− | + | | {{flag|eu}} | |
− | + | | [[Template:Flag/eu|<code>eu</code>]] | |
| [[Template:Flag/europe|Europe]] | | [[Template:Flag/europe|Europe]] | ||
− | |||
− | |||
|- | |- | ||
| {{flag|nam}} | | {{flag|nam}} | ||
| [[Template:Flag/nam|<code>nam</code>]] | | [[Template:Flag/nam|<code>nam</code>]] | ||
| [[Template:Flag/north america|North America]] | | [[Template:Flag/north america|North America]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| {{flag|sam}} | | {{flag|sam}} | ||
Line 79: | Line 95: | ||
| [[Template:Flag/south america|South America]] | | [[Template:Flag/south america|South America]] | ||
|- | |- | ||
− | + | | {{flag|un}} | |
− | + | | [[Template:Flag/un|<code>un</code>]] | |
| [[Template:Flag/united nations|United Nations]] | | [[Template:Flag/united nations|United Nations]] | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| {{flag|}} | | {{flag|}} | ||
| [[Template:Flag/|<code></code>]] | | [[Template:Flag/|<code></code>]] | ||
− | | [[Template:Flag/ | + | | [[Template:Flag/|Unknown]] |
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
− | |||
=== A === | === A === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 145: | Line 154: | ||
=== B === | === B === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
− | | | + | | style="width: 29px;" | {{flag|bs}} |
− | | | + | | style="width: 44px;" | [[Template:Flag/bs|<code>bs</code>]] |
− | | style="width: 160px;" | [[Template:Flag/ | + | | style="width: 160px;" | [[Template:Flag/bahamas|The Bahamas]] |
− | |||
− | |||
|- | |- | ||
| {{flag|bh}} | | {{flag|bh}} | ||
Line 231: | Line 238: | ||
| [[Template:Flag/canada|Canada]] | | [[Template:Flag/canada|Canada]] | ||
|- | |- | ||
− | + | | {{flag|cv}} | |
− | + | | [[Template:Flag/cv|<code>cv</code>]] | |
| [[Template:Flag/cape verde|Cape Verde]] | | [[Template:Flag/cape verde|Cape Verde]] | ||
− | |||
− | |||
|- | |- | ||
| {{flag|cf}} | | {{flag|cf}} | ||
Line 260: | Line 265: | ||
| [[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<br>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 290: | ||
| [[Template:Flag/cyprus|Cyprus]] | | [[Template:Flag/cyprus|Cyprus]] | ||
|- | |- | ||
− | + | | {{flag|cz}} | |
− | + | | [[Template:Flag/cz|<code>cz</code>]] | |
| [[Template:Flag/czech republic|Czech Republic]] | | [[Template:Flag/czech republic|Czech Republic]] | ||
|- | |- | ||
− | + | | {{flag|ci}} | |
− | + | | [[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]] | ||
− | |||
− | |||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
Line 293: | Line 302: | ||
=== D === | === D === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
− | | | + | | style="width: 29px;" | {{flag|dk}} |
− | | | + | | style="width: 44px;" | [[Template:Flag/dk|<code>dk</code>]] |
− | | style="width: 160px;" | + | | style="width: 160px;" | [[Template:Flag/denmark|Denmark]] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| {{flag|dj}} | | {{flag|dj}} | ||
Line 319: | Line 322: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
|- | |- | ||
− | | | + | | style="width: 29px;" | {{flag|tl}} |
− | | | + | | style="width: 44px;" | [[Template:Flag/tl|<code>tl</code>]] |
| style="width: 160px;" | [[Template:Flag/east timor|East Timor]] | | style="width: 160px;" | [[Template:Flag/east timor|East Timor]] | ||
− | |||
− | |||
|- | |- | ||
| {{flag|ec}} | | {{flag|ec}} | ||
Line 355: | Line 356: | ||
| [[Template:Flag/estonia|Estonia]] | | [[Template:Flag/estonia|Estonia]] | ||
|- | |- | ||
− | + | | {{flag|sz}} | |
− | + | | [[Template:Flag/sz|<code>sz</code>]] | |
| [[Template:Flag/eswatini|Eswatini]] | | [[Template:Flag/eswatini|Eswatini]] | ||
− | |||
− | |||
|- | |- | ||
| {{flag|et}} | | {{flag|et}} | ||
Line 366: | Line 365: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
− | |||
=== F === | === F === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 390: | Line 388: | ||
| style="width: 160px;" | [[Template:Flag/gabon|Gabon]] | | style="width: 160px;" | [[Template:Flag/gabon|Gabon]] | ||
|- | |- | ||
− | + | | {{flag|gm}} | |
− | + | | [[Template:Flag/gm|<code>gm</code>]] | |
− | |||
− | |||
| [[Template:Flag/gambia|Gambia]] | | [[Template:Flag/gambia|Gambia]] | ||
|- | |- | ||
Line 437: | Line 433: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
− | |||
=== H === | === H === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 580: | Line 575: | ||
=== M === | === M === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| style="width: 29px;" | {{flag|mg}} | | style="width: 29px;" | {{flag|mg}} | ||
Line 660: | Line 649: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
− | |||
=== N === | === N === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 676: | Line 664: | ||
| [[Template:Flag/nepal|Nepal]] | | [[Template:Flag/nepal|Nepal]] | ||
|- | |- | ||
− | + | | {{flag|nl}} | |
− | + | | [[Template:Flag/nl|<code>nl</code>]] | |
| [[Template:Flag/netherlands|Netherlands]] | | [[Template:Flag/netherlands|Netherlands]] | ||
− | |||
− | |||
|- | |- | ||
| {{flag|nz}} | | {{flag|nz}} | ||
Line 702: | Line 688: | ||
| [[Template:Flag/north korea|North Korea]] | | [[Template:Flag/north korea|North Korea]] | ||
|- | |- | ||
− | + | | {{flag|mk}} | |
− | + | | [[Template:Flag/mk|<code>mk</code>]] | |
− | |||
− | |||
| [[Template:Flag/north macedonia|North Macedonia]] | | [[Template:Flag/north macedonia|North Macedonia]] | ||
|- | |- | ||
Line 717: | Line 701: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
− | |||
=== O === | === O === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 785: | Line 768: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
|- | |- | ||
− | | | + | | style="width: 29px;" | {{flag|ro}} |
− | | | + | | style="width: 44px;" | [[Template:Flag/ro|<code>ro</code>]] |
− | | style="width: 160px;" | + | | style="width: 160px;" | [[Template:Flag/romania|Romania]] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
|- | |- | ||
| {{flag|ru}} | | {{flag|ru}} | ||
Line 985: | Line 962: | ||
| [[Template:Flag/uae|<code>uae</code>]] | | [[Template:Flag/uae|<code>uae</code>]] | ||
|- | |- | ||
− | | rowspan= | + | | rowspan=2 | {{flag|uk}} |
| [[Template:Flag/uk|<code>uk</code>]] | | [[Template:Flag/uk|<code>uk</code>]] | ||
− | | [[Template:Flag/united kingdom|United Kingdom]] | + | | rowspan=2 | [[Template:Flag/united kingdom|United Kingdom]] |
|- | |- | ||
− | + | | [[Template:Flag/gb|<code>gb</code>]] | |
− | |||
− | |||
− | |||
|- | |- | ||
| rowspan=2 | {{flag|us}} | | rowspan=2 | {{flag|us}} | ||
| [[Template:Flag/us|<code>us</code>]] | | [[Template:Flag/us|<code>us</code>]] | ||
− | | [[Template:Flag/united states|United States]] | + | | rowspan=2 | [[Template:Flag/united states|United States]] |
|- | |- | ||
| [[Template:Flag/usa|<code>usa</code>]] | | [[Template:Flag/usa|<code>usa</code>]] | ||
− | |||
|- | |- | ||
| {{flag|uy}} | | {{flag|uy}} | ||
Line 1,010: | Line 983: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
− | |||
=== V === | === V === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
Line 1,035: | Line 1,007: | ||
|- | |- | ||
| rowspan=2 style="width: 29px;" | {{flag|ukwa}} | | rowspan=2 style="width: 29px;" | {{flag|ukwa}} | ||
− | | style="width: 44px;" | [[Template:Flag/ | + | | style="width: 44px;" | [[Template:Flag/ukwa|<code>ukwa</code>]] |
| rowspan=2 style="width: 160px;" | [[Template:Flag/wales|Wales]] | | rowspan=2 style="width: 160px;" | [[Template:Flag/wales|Wales]] | ||
|- | |- | ||
− | | [[Template:Flag/ | + | | [[Template:Flag/wa|<code>wa</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 --> | <div style="width:273px"></div><!-- Div to keep tables aligned. Delete this if adding a table --> | ||
Line 1,067: | Line 1,038: | ||
{{Box|end}} | {{Box|end}} | ||
− | == | + | == Adding a flag == |
− | + | If you wish to add a flag, the following requirements must be followed | |
− | + | === Image size === | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | If you wish to add a flag, the following requirements must be followed | ||
− | |||
*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 === | |
− | *Your flag should be uploaded to <Code>File:Flag of | + | *Your flag should be uploaded to <Code>File:Flag of <nowiki><fullflagname></nowiki>.png</code> |
− | *Make sure you add your flag | + | *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) | |
− | * | + | |
− | + | <noinclude>[[Category:Flag Documentation Templates]]</noinclude> | |
− |