Difference between revisions of "Template:Flag/doc"
Jump to navigation
Jump to search
| (21 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
| − | '''Template:Flag''' displays a flag icon | + | '''Template:Flag''' displays a flag icon. |
== Usage == | == Usage == | ||
| − | <code><nowiki>{{flag|</nowiki>'''<nowiki> | + | <code><nowiki>{{flag|</nowiki>'''<nowiki>1</nowiki>'''<nowiki>}}</nowiki></code> |
| − | === | + | === 1 === |
| − | 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 flag will be shown. |
| − | + | * All valid settings for flags are listed in the tables below | |
| − | * | + | * This parameter is case-insensitive. |
| − | + | ||
| − | |||
| − | * | ||
== Examples == | == Examples == | ||
| − | {| class="wikitable" style="text-align: center | + | {| class="wikitable" style="text-align: center;" |
| − | + | | style="background-color:#ecfcf4;border-top:hidden;border-left:hidden" | | |
| − | ! style=" | + | ! You type |
| + | ! You get | ||
| + | |- | ||
| + | ! style="font-weight:normal" | ''Full name'' | ||
| + | | <code><nowiki>{{flag|United Nations}}</nowiki></code> | ||
| + | | {{flag|United Nations}} | ||
| + | |- | ||
| + | ! style="font-weight:normal" | ''Alternate name'' | ||
| + | | <code><nowiki>{{flag|world}}</nowiki></code> | ||
| + | | {{flag|world}} | ||
|- | |- | ||
| − | + | ! style="font-weight:normal" | ''Abbreviation'' | |
| − | | <code><nowiki>{{flag| | + | | <code><nowiki>{{flag|un}}</nowiki></code> |
| − | + | | {{flag|un}} | |
| − | |||
| − | | {{flag| | ||
| − | |||
|- | |- | ||
| − | + | ! style="font-weight:normal" | ''No parameter'' | |
| − | | <code><nowiki>{{flag| | + | | <code><nowiki>{{flag|}}</nowiki></code> |
| − | + | | {{flag|}} | |
| − | |||
| − | | {{flag| | ||
| − | |||
|- | |- | ||
| − | + | ! style="font-weight:normal" | ''Invalid parameter'' | |
| <code><nowiki>{{flag|invalid}}</nowiki></code> | | <code><nowiki>{{flag|invalid}}</nowiki></code> | ||
| − | |||
| − | |||
| {{flag|invalid}} | | {{flag|invalid}} | ||
| − | |||
|} | |} | ||
== Valid settings == | == Valid settings == | ||
| − | + | === Note: United Kingdom flags === | |
| − | + | 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. | |
| − | == | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | The individual flags of | ||
| − | |||
| − | |||
{| 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 75: | Line 43: | ||
=== Miscellaneous === | === Miscellaneous === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| − | | {{flag|ukus}} | + | | 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>]] | | [[Template:Flag/ukus|<code>ukus</code>]] | ||
| − | | [[Template:Flag/english language|English Language]] | + | | rowspan=2 | [[Template:Flag/english language|English Language]] |
| + | |- | ||
| + | | [[Template:Flag/usuk|<code>usuk</code>]] | ||
|- | |- | ||
| − | | {{flag|eu}} | + | | rowspan=2 | {{flag|eu}} |
| − | | [[Template:Flag/eu|<code>eu</code>]] | + | | rowspan=2 | [[Template:Flag/eu|<code>eu</code>]] |
| [[Template:Flag/europe|Europe]] | | [[Template:Flag/europe|Europe]] | ||
| + | |- | ||
| + | | [[Template:Flag/european union|European Union]] | ||
|- | |- | ||
| {{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]] | ||
| + | |- | ||
| + | | 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}} | | {{flag|sam}} | ||
| Line 95: | Line 79: | ||
| [[Template:Flag/south america|South America]] | | [[Template:Flag/south america|South America]] | ||
|- | |- | ||
| − | | {{flag|un}} | + | | rowspan=4 | {{flag|un}} |
| − | | [[Template:Flag/un|<code>un</code>]] | + | | rowspan=4 | [[Template:Flag/un|<code>un</code>]] |
| [[Template:Flag/united nations|United Nations]] | | [[Template:Flag/united nations|United Nations]] | ||
| + | |- | ||
| + | | [[Template:Flag/global|Global]] | ||
| + | |- | ||
| + | | [[Template:Flag/international|International]] | ||
| + | |- | ||
| + | | [[Template:Flag/world|World]] | ||
|- | |- | ||
| {{flag|}} | | {{flag|}} | ||
| [[Template:Flag/|<code></code>]] | | [[Template:Flag/|<code></code>]] | ||
| − | | [[Template:Flag/|Unknown]] | + | | [[Template:Flag/unknown|Unknown]] |
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
| + | |||
=== A === | === A === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| Line 154: | Line 145: | ||
=== B === | === B === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| − | | style="width: 29px;" | {{flag|bs}} | + | | rowspan=2 style="width: 29px;" | {{flag|bs}} |
| − | | style="width: 44px;" | [[Template:Flag/bs|<code>bs</code>]] | + | | rowspan=2 style="width: 44px;" | [[Template:Flag/bs|<code>bs</code>]] |
| − | | style="width: 160px;" | [[Template:Flag/bahamas|The Bahamas]] | + | | style="width: 160px;" | [[Template:Flag/bahamas|Bahamas]] |
| + | |- | ||
| + | | [[Template:Flag/the bahamas|The Bahamas]] | ||
|- | |- | ||
| {{flag|bh}} | | {{flag|bh}} | ||
| Line 238: | Line 231: | ||
| [[Template:Flag/canada|Canada]] | | [[Template:Flag/canada|Canada]] | ||
|- | |- | ||
| − | | {{flag|cv}} | + | | rowspan=2 | {{flag|cv}} |
| − | | [[Template:Flag/cv|<code>cv</code>]] | + | | rowspan=2 | [[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}} | ||
| Line 265: | Line 260: | ||
| [[Template:Flag/km|<code>km</code>]] | | [[Template:Flag/km|<code>km</code>]] | ||
| [[Template:Flag/comoros|Comoros]] | | [[Template:Flag/comoros|Comoros]] | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|- | |- | ||
| {{flag|cr}} | | {{flag|cr}} | ||
| Line 290: | Line 277: | ||
| [[Template:Flag/cyprus|Cyprus]] | | [[Template:Flag/cyprus|Cyprus]] | ||
|- | |- | ||
| − | | {{flag|cz}} | + | | rowspan=2 | {{flag|cz}} |
| − | | [[Template:Flag/cz|<code>cz</code>]] | + | | rowspan=2 | [[Template:Flag/cz|<code>cz</code>]] |
| [[Template:Flag/czech republic|Czech Republic]] | | [[Template:Flag/czech republic|Czech Republic]] | ||
|- | |- | ||
| − | | {{flag|ci}} | + | | [[Template:Flag/czechia|Czechia]] |
| − | | [[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}} | ||
| Line 302: | Line 293: | ||
=== D === | === D === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| − | | style="width: 29px;" | {{flag| | + | | rowspan=2 style="width: 29px;" | {{flag|cd}} |
| − | | style="width: 44px;" | [[Template:Flag/ | + | | rowspan=2 style="width: 44px;" | [[Template:Flag/cd|<code>cd</code>]] |
| − | | style="width: 160px;" | [[Template:Flag/denmark|Denmark]] | + | | style="width: 160px;" | [[Template:Flag/democratic republic of the congo|Democratic Republic<br>of the Congo]] |
| + | |- | ||
| + | | [[Template:Flag/zaire|Zaire]] | ||
| + | |- | ||
| + | | {{flag|dk}} | ||
| + | | [[Template:Flag/dk|<code>dk</code>]] | ||
| + | | [[Template:Flag/denmark|Denmark]] | ||
|- | |- | ||
| {{flag|dj}} | | {{flag|dj}} | ||
| Line 322: | Line 319: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
|- | |- | ||
| − | | style="width: 29px;" | {{flag|tl}} | + | | rowspan=2 style="width: 29px;" | {{flag|tl}} |
| − | | style="width: 44px;" | [[Template:Flag/tl|<code>tl</code>]] | + | | rowspan=2 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]] | ||
| + | |- | ||
| + | | [[Template:Flag/timor-leste|Timor-Leste]] | ||
|- | |- | ||
| {{flag|ec}} | | {{flag|ec}} | ||
| Line 356: | Line 355: | ||
| [[Template:Flag/estonia|Estonia]] | | [[Template:Flag/estonia|Estonia]] | ||
|- | |- | ||
| − | | {{flag|sz}} | + | | rowspan=2 | {{flag|sz}} |
| − | | [[Template:Flag/sz|<code>sz</code>]] | + | | rowspan=2 | [[Template:Flag/sz|<code>sz</code>]] |
| [[Template:Flag/eswatini|Eswatini]] | | [[Template:Flag/eswatini|Eswatini]] | ||
| + | |- | ||
| + | | [[Template:Flag/swaziland|Swaziland]] | ||
|- | |- | ||
| {{flag|et}} | | {{flag|et}} | ||
| Line 365: | Line 366: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
| + | |||
=== F === | === F === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| Line 388: | Line 390: | ||
| style="width: 160px;" | [[Template:Flag/gabon|Gabon]] | | style="width: 160px;" | [[Template:Flag/gabon|Gabon]] | ||
|- | |- | ||
| − | | {{flag|gm}} | + | | rowspan=2 | {{flag|gm}} |
| − | | [[Template:Flag/gm|<code>gm</code>]] | + | | rowspan=2 | [[Template:Flag/gm|<code>gm</code>]] |
| + | | [[Template:Flag/the gambia|The Gambia]] | ||
| + | |- | ||
| [[Template:Flag/gambia|Gambia]] | | [[Template:Flag/gambia|Gambia]] | ||
|- | |- | ||
| Line 433: | Line 437: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
| + | |||
=== H === | === H === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| Line 575: | Line 580: | ||
=== 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}} | ||
| Line 649: | Line 660: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
| + | |||
=== N === | === N === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| Line 664: | Line 676: | ||
| [[Template:Flag/nepal|Nepal]] | | [[Template:Flag/nepal|Nepal]] | ||
|- | |- | ||
| − | | {{flag|nl}} | + | | rowspan=2 | {{flag|nl}} |
| − | | [[Template:Flag/nl|<code>nl</code>]] | + | | rowspan=2 | [[Template:Flag/nl|<code>nl</code>]] |
| [[Template:Flag/netherlands|Netherlands]] | | [[Template:Flag/netherlands|Netherlands]] | ||
| + | |- | ||
| + | | [[Template:Flag/holland|Holland]] | ||
|- | |- | ||
| {{flag|nz}} | | {{flag|nz}} | ||
| Line 688: | Line 702: | ||
| [[Template:Flag/north korea|North Korea]] | | [[Template:Flag/north korea|North Korea]] | ||
|- | |- | ||
| − | | {{flag|mk}} | + | | rowspan=2 | {{flag|mk}} |
| − | | [[Template:Flag/mk|<code>mk</code>]] | + | | rowspan=2 | [[Template:Flag/mk|<code>mk</code>]] |
| + | | [[Template:Flag/macedonia|Macedonia]] | ||
| + | |- | ||
| [[Template:Flag/north macedonia|North Macedonia]] | | [[Template:Flag/north macedonia|North Macedonia]] | ||
|- | |- | ||
| Line 701: | Line 717: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
| + | |||
=== O === | === O === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| Line 768: | Line 785: | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
|- | |- | ||
| − | | style="width: 29px;" | {{flag| | + | | rowspan=2 style="width: 29px;" | {{flag|cg}} |
| − | | style="width: 44px;" | [[Template:Flag/ | + | | rowspan=2 style="width: 44px;" | [[Template:Flag/cg|<code>cg</code>]] |
| − | | style="width: 160px;" | [[Template:Flag/romania|Romania]] | + | | style="width: 160px;" | [[Template:Flag/republic of the congo|Republic of the Congo]] |
| + | |- | ||
| + | | [[Template:Flag/congo|Congo]] | ||
| + | |- | ||
| + | | {{flag|ro}} | ||
| + | | [[Template:Flag/ro|<code>ro</code>]] | ||
| + | | [[Template:Flag/romania|Romania]] | ||
|- | |- | ||
| {{flag|ru}} | | {{flag|ru}} | ||
| Line 962: | Line 985: | ||
| [[Template:Flag/uae|<code>uae</code>]] | | [[Template:Flag/uae|<code>uae</code>]] | ||
|- | |- | ||
| − | | rowspan= | + | | rowspan=3 | {{flag|uk}} |
| [[Template:Flag/uk|<code>uk</code>]] | | [[Template:Flag/uk|<code>uk</code>]] | ||
| − | + | | [[Template:Flag/united kingdom|United Kingdom]] | |
|- | |- | ||
| − | | [[Template:Flag/gb|<code>gb</code>]] | + | | rowspan=2 | [[Template:Flag/gb|<code>gb</code>]] |
| + | | [[Template:Flag/britain|Britain]] | ||
| + | |- | ||
| + | | [[Template:Flag/great britain|Great Britain]] | ||
|- | |- | ||
| 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]] | |
|- | |- | ||
| [[Template:Flag/usa|<code>usa</code>]] | | [[Template:Flag/usa|<code>usa</code>]] | ||
| + | | [[Template:Flag/united states of america|United States of America]] | ||
|- | |- | ||
| {{flag|uy}} | | {{flag|uy}} | ||
| Line 983: | Line 1,010: | ||
|} | |} | ||
{{Box|break|padding=1em}} | {{Box|break|padding=1em}} | ||
| + | |||
=== V === | === V === | ||
{| class="wikitable" style="text-align: center;" | {| class="wikitable" style="text-align: center;" | ||
| Line 1,007: | Line 1,035: | ||
|- | |- | ||
| rowspan=2 style="width: 29px;" | {{flag|ukwa}} | | rowspan=2 style="width: 29px;" | {{flag|ukwa}} | ||
| − | | style="width: 44px;" | [[Template:Flag/ | + | | style="width: 44px;" | [[Template:Flag/wa|<code>wa</code>]] |
| rowspan=2 style="width: 160px;" | [[Template:Flag/wales|Wales]] | | rowspan=2 style="width: 160px;" | [[Template:Flag/wales|Wales]] | ||
|- | |- | ||
| − | | [[Template:Flag/ | + | | [[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 --> | <div style="width:273px"></div><!-- Div to keep tables aligned. Delete this if adding a table --> | ||
| Line 1,038: | Line 1,067: | ||
{{Box|end}} | {{Box|end}} | ||
| − | == | + | == Developer documentation == |
| − | If you wish to add a flag, the following requirements must be followed | + | === How this template works === |
| − | === Image size === | + | # '''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 === | ||
| + | If you wish to add a flag, the following requirements must be followed: | ||
| + | ==== 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 < | + | *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 |
| − | *Make sure you add your flag to [[:Category:Flag Images]] | + | *Make sure you add your flag image to [[:Category:Flag Images]]. |
| − | === Update templates === | + | ==== Update templates ==== |
| − | *[[Template:Flag/abbr | + | *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: |
| − | + | <pre><nowiki>{{Flag icon|</nowiki>'''ProperFlagName'''<nowiki>}}<noinclude>[[Category:Flag sub-templates]]</noinclude></nowiki></pre> | |
| − | + | *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>) | |
| − | <noinclude>[[Category:Flag Documentation Templates]]</noinclude> | + | **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 [[Template:Flag/doc|documentation template]].<noinclude>[[Category:Flag Documentation Templates]]</noinclude> | ||
Latest revision as of 05:00, 21 June 2022
Template:Flag displays a flag icon.
Usage[edit]
{{flag|1}}
1[edit]
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[edit]
| You type | You get | |
|---|---|---|
| Full name | {{flag|United Nations}}
|
Error creating thumbnail: Unable to save thumbnail to destination
|
| Alternate name | {{flag|world}}
|
Error creating thumbnail: Unable to save thumbnail to destination
|
| Abbreviation | {{flag|un}}
|
Error creating thumbnail: Unable to save thumbnail to destination
|
| No parameter | {{flag|}}
|
Error creating thumbnail: Unable to save thumbnail to destination
|
| Invalid parameter | {{flag|invalid}}
|
Template:Flag/invalid |
Valid settings[edit]
Note: United Kingdom flags[edit]
The individual flags of
Error creating thumbnail: Unable to save thumbnail to destination
England,
Error creating thumbnail: Unable to save thumbnail to destination
Northern Ireland,
Error creating thumbnail: Unable to save thumbnail to destination
Scotland, and
Error creating thumbnail: Unable to save thumbnail to destination
Wales should take preference in all possible circumstances over the
Error creating thumbnail: Unable to save thumbnail to destination
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[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
asean
|
ASEAN |
Error creating thumbnail: Unable to save thumbnail to destination
|
ukus
|
English Language |
usuk
| ||
Error creating thumbnail: Unable to save thumbnail to destination
|
eu
|
Europe |
| European Union | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
nam
|
North America |
Error creating thumbnail: Unable to save thumbnail to destination
|
aunz
|
Australasia |
| Oceania | ||
| Australia/New Zealand | ||
nzau
|
New Zealand/Australia | |
Error creating thumbnail: Unable to save thumbnail to destination
|
sam
|
South America |
Error creating thumbnail: Unable to save thumbnail to destination
|
un
|
United Nations |
| Global | ||
| International | ||
| World | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
|
Unknown |
A[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
af
|
Afghanistan |
Error creating thumbnail: Unable to save thumbnail to destination
|
al
|
Albania |
Error creating thumbnail: Unable to save thumbnail to destination
|
dz
|
Algeria |
Error creating thumbnail: Unable to save thumbnail to destination
|
ad
|
Andorra |
Error creating thumbnail: Unable to save thumbnail to destination
|
ao
|
Angola |
Error creating thumbnail: Unable to save thumbnail to destination
|
ag
|
Antigua and Barbuda |
Error creating thumbnail: Unable to save thumbnail to destination
|
ar
|
Argentina |
Error creating thumbnail: Unable to save thumbnail to destination
|
am
|
Armenia |
Error creating thumbnail: Unable to save thumbnail to destination
|
au
|
Australia |
Error creating thumbnail: Unable to save thumbnail to destination
|
at
|
Austria |
Error creating thumbnail: Unable to save thumbnail to destination
|
az
|
Azerbaijan |
B[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
bs
|
Bahamas |
| The Bahamas | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
bh
|
Bahrain |
Error creating thumbnail: Unable to save thumbnail to destination
|
bd
|
Bangladesh |
Error creating thumbnail: Unable to save thumbnail to destination
|
bb
|
Barbados |
Error creating thumbnail: Unable to save thumbnail to destination
|
by
|
Belarus |
Error creating thumbnail: Unable to save thumbnail to destination
|
be
|
Belgium |
Error creating thumbnail: Unable to save thumbnail to destination
|
bz
|
Belize |
Error creating thumbnail: Unable to save thumbnail to destination
|
bj
|
Benin |
Error creating thumbnail: Unable to save thumbnail to destination
|
bt
|
Bhutan |
Error creating thumbnail: Unable to save thumbnail to destination
|
bo
|
Bolivia |
Error creating thumbnail: Unable to save thumbnail to destination
|
ba
|
Bosnia and Herzegovina |
Error creating thumbnail: Unable to save thumbnail to destination
|
bw
|
Botswana |
Error creating thumbnail: Unable to save thumbnail to destination
|
br
|
Brazil |
Error creating thumbnail: Unable to save thumbnail to destination
|
bn
|
Brunei |
Error creating thumbnail: Unable to save thumbnail to destination
|
bg
|
Bulgaria |
Error creating thumbnail: Unable to save thumbnail to destination
|
bf
|
Burkina Faso |
Error creating thumbnail: Unable to save thumbnail to destination
|
bi
|
Burundi |
C[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
kh
|
Cambodia |
Error creating thumbnail: Unable to save thumbnail to destination
|
cm
|
Cameroon |
Error creating thumbnail: Unable to save thumbnail to destination
|
ca
|
Canada |
Error creating thumbnail: Unable to save thumbnail to destination
|
cv
|
Cape Verde |
| Cabo Verde | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
cf
|
Central African Republic |
Error creating thumbnail: Unable to save thumbnail to destination
|
td
|
Chad |
Error creating thumbnail: Unable to save thumbnail to destination
|
cl
|
Chile |
Error creating thumbnail: Unable to save thumbnail to destination
|
cn
|
China |
Error creating thumbnail: Unable to save thumbnail to destination
|
co
|
Colombia |
Error creating thumbnail: Unable to save thumbnail to destination
|
km
|
Comoros |
Error creating thumbnail: Unable to save thumbnail to destination
|
cr
|
Costa Rica |
Error creating thumbnail: Unable to save thumbnail to destination
|
hr
|
Croatia |
Error creating thumbnail: Unable to save thumbnail to destination
|
cu
|
Cuba |
Error creating thumbnail: Unable to save thumbnail to destination
|
cy
|
Cyprus |
Error creating thumbnail: Unable to save thumbnail to destination
|
cz
|
Czech Republic |
| Czechia | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
ci
|
Côte d'Ivoire |
| Ivory Coast |
D[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
cd
|
Democratic Republic of the Congo |
| Zaire | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
dk
|
Denmark |
Error creating thumbnail: Unable to save thumbnail to destination
|
dj
|
Djibouti |
Error creating thumbnail: Unable to save thumbnail to destination
|
dm
|
Dominica |
Error creating thumbnail: Unable to save thumbnail to destination
|
do
|
Dominican Republic |
E[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
tl
|
East Timor |
| Timor-Leste | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
ec
|
Ecuador |
Error creating thumbnail: Unable to save thumbnail to destination
|
eg
|
Egypt |
Error creating thumbnail: Unable to save thumbnail to destination
|
sv
|
El Salvador |
Error creating thumbnail: Unable to save thumbnail to destination
|
uken
|
England |
en
| ||
Error creating thumbnail: Unable to save thumbnail to destination
|
gq
|
Equatorial Guinea |
Error creating thumbnail: Unable to save thumbnail to destination
|
er
|
Eritrea |
Error creating thumbnail: Unable to save thumbnail to destination
|
ee
|
Estonia |
Error creating thumbnail: Unable to save thumbnail to destination
|
sz
|
Eswatini |
| Swaziland | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
et
|
Ethiopia |
F[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
fj
|
Fiji |
Error creating thumbnail: Unable to save thumbnail to destination
|
fi
|
Finland |
Error creating thumbnail: Unable to save thumbnail to destination
|
fr
|
France |
G[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
ga
|
Gabon |
Error creating thumbnail: Unable to save thumbnail to destination
|
gm
|
The Gambia |
| Gambia | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
ge
|
Georgia |
Error creating thumbnail: Unable to save thumbnail to destination
|
de
|
Germany |
Error creating thumbnail: Unable to save thumbnail to destination
|
gh
|
Ghana |
Error creating thumbnail: Unable to save thumbnail to destination
|
gr
|
Greece |
Error creating thumbnail: Unable to save thumbnail to destination
|
gl
|
Greenland |
Error creating thumbnail: Unable to save thumbnail to destination
|
gd
|
Grenada |
Error creating thumbnail: Unable to save thumbnail to destination
|
gt
|
Guatemala |
Error creating thumbnail: Unable to save thumbnail to destination
|
gn
|
Guinea |
Error creating thumbnail: Unable to save thumbnail to destination
|
gw
|
Guinea-Bissau |
Error creating thumbnail: Unable to save thumbnail to destination
|
gy
|
Guyana |
H[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
ht
|
Haiti |
Error creating thumbnail: Unable to save thumbnail to destination
|
hn
|
Honduras |
Error creating thumbnail: Unable to save thumbnail to destination
|
hk
|
Hong Kong |
Error creating thumbnail: Unable to save thumbnail to destination
|
hu
|
Hungary |
I[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
is
|
Iceland |
Error creating thumbnail: Unable to save thumbnail to destination
|
in
|
India |
Error creating thumbnail: Unable to save thumbnail to destination
|
id
|
Indonesia |
Error creating thumbnail: Unable to save thumbnail to destination
|
ir
|
Iran |
Error creating thumbnail: Unable to save thumbnail to destination
|
iq
|
Iraq |
Error creating thumbnail: Unable to save thumbnail to destination
|
ie
|
Ireland |
Error creating thumbnail: Unable to save thumbnail to destination
|
il
|
Israel |
Error creating thumbnail: Unable to save thumbnail to destination
|
it
|
Italy |
J[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
jm
|
Jamaica |
Error creating thumbnail: Unable to save thumbnail to destination
|
jp
|
Japan |
Error creating thumbnail: Unable to save thumbnail to destination
|
jo
|
Jordan |
K[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
kz
|
Kazakhstan |
Error creating thumbnail: Unable to save thumbnail to destination
|
ke
|
Kenya |
Error creating thumbnail: Unable to save thumbnail to destination
|
ki
|
Kiribati |
Error creating thumbnail: Unable to save thumbnail to destination
|
xk
|
Kosovo |
Error creating thumbnail: Unable to save thumbnail to destination
|
kw
|
Kuwait |
Error creating thumbnail: Unable to save thumbnail to destination
|
kg
|
Kyrgyzstan |
L[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
la
|
Laos |
Error creating thumbnail: Unable to save thumbnail to destination
|
lv
|
Latvia |
Error creating thumbnail: Unable to save thumbnail to destination
|
lb
|
Lebanon |
Error creating thumbnail: Unable to save thumbnail to destination
|
ls
|
Lesotho |
Error creating thumbnail: Unable to save thumbnail to destination
|
lr
|
Liberia |
Error creating thumbnail: Unable to save thumbnail to destination
|
ly
|
Libya |
Error creating thumbnail: Unable to save thumbnail to destination
|
li
|
Liechtenstein |
Error creating thumbnail: Unable to save thumbnail to destination
|
lt
|
Lithuania |
Error creating thumbnail: Unable to save thumbnail to destination
|
lu
|
Luxembourg |
M[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
mo
|
Macao |
| Macau | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
mg
|
Madagascar |
Error creating thumbnail: Unable to save thumbnail to destination
|
mw
|
Malawi |
Error creating thumbnail: Unable to save thumbnail to destination
|
my
|
Malaysia |
Error creating thumbnail: Unable to save thumbnail to destination
|
mv
|
Maldives |
Error creating thumbnail: Unable to save thumbnail to destination
|
ml
|
Mali |
Error creating thumbnail: Unable to save thumbnail to destination
|
mt
|
Malta |
Error creating thumbnail: Unable to save thumbnail to destination
|
mh
|
Marshall Islands |
Error creating thumbnail: Unable to save thumbnail to destination
|
mr
|
Mauritania |
Error creating thumbnail: Unable to save thumbnail to destination
|
mu
|
Mauritius |
Error creating thumbnail: Unable to save thumbnail to destination
|
mx
|
Mexico |
Error creating thumbnail: Unable to save thumbnail to destination
|
fm
|
Micronesia |
Error creating thumbnail: Unable to save thumbnail to destination
|
md
|
Moldova |
Error creating thumbnail: Unable to save thumbnail to destination
|
mc
|
Monaco |
Error creating thumbnail: Unable to save thumbnail to destination
|
mn
|
Mongolia |
Error creating thumbnail: Unable to save thumbnail to destination
|
me
|
Montenegro |
Error creating thumbnail: Unable to save thumbnail to destination
|
ma
|
Morocco |
Error creating thumbnail: Unable to save thumbnail to destination
|
mz
|
Mozambique |
Error creating thumbnail: Unable to save thumbnail to destination
|
mm
|
Myanmar |
N[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
na
|
Namibia |
Error creating thumbnail: Unable to save thumbnail to destination
|
nr
|
Nauru |
Error creating thumbnail: Unable to save thumbnail to destination
|
np
|
Nepal |
Error creating thumbnail: Unable to save thumbnail to destination
|
nl
|
Netherlands |
| Holland | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
nz
|
New Zealand |
Error creating thumbnail: Unable to save thumbnail to destination
|
ni
|
Nicaragua |
Error creating thumbnail: Unable to save thumbnail to destination
|
ne
|
Niger |
Error creating thumbnail: Unable to save thumbnail to destination
|
ng
|
Nigeria |
Error creating thumbnail: Unable to save thumbnail to destination
|
kp
|
North Korea |
Error creating thumbnail: Unable to save thumbnail to destination
|
mk
|
Macedonia |
| North Macedonia | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
ukni
|
Northern Ireland |
Error creating thumbnail: Unable to save thumbnail to destination
|
no
|
Norway |
P[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
pk
|
Pakistan |
Error creating thumbnail: Unable to save thumbnail to destination
|
pw
|
Palau |
Error creating thumbnail: Unable to save thumbnail to destination
|
ps
|
Palestine |
Error creating thumbnail: Unable to save thumbnail to destination
|
pa
|
Panama |
Error creating thumbnail: Unable to save thumbnail to destination
|
pg
|
Papua New Guinea |
Error creating thumbnail: Unable to save thumbnail to destination
|
py
|
Paraguay |
Error creating thumbnail: Unable to save thumbnail to destination
|
pe
|
Peru |
Error creating thumbnail: Unable to save thumbnail to destination
|
ph
|
Philippines |
Error creating thumbnail: Unable to save thumbnail to destination
|
pl
|
Poland |
Error creating thumbnail: Unable to save thumbnail to destination
|
pt
|
Portugal |
Error creating thumbnail: Unable to save thumbnail to destination
|
pr
|
Puerto Rico |
R[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
cg
|
Republic of the Congo |
| Congo | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
ro
|
Romania |
Error creating thumbnail: Unable to save thumbnail to destination
|
ru
|
Russia |
Error creating thumbnail: Unable to save thumbnail to destination
|
rw
|
Rwanda |
S[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
kn
|
Saint Kitts and Nevis |
Error creating thumbnail: Unable to save thumbnail to destination
|
lc
|
Saint Lucia |
Error creating thumbnail: Unable to save thumbnail to destination
|
vc
|
Saint Vincent and the Grenadines |
Error creating thumbnail: Unable to save thumbnail to destination
|
ws
|
Samoa |
Error creating thumbnail: Unable to save thumbnail to destination
|
sm
|
San Marino |
Error creating thumbnail: Unable to save thumbnail to destination
|
st
|
Sao Tome and Principe |
Error creating thumbnail: Unable to save thumbnail to destination
|
sa
|
Saudi Arabia |
Error creating thumbnail: Unable to save thumbnail to destination
|
uksc
|
Scotland |
Error creating thumbnail: Unable to save thumbnail to destination
|
sn
|
Senegal |
Error creating thumbnail: Unable to save thumbnail to destination
|
rs
|
Serbia |
Error creating thumbnail: Unable to save thumbnail to destination
|
sc
|
Seychelles |
Error creating thumbnail: Unable to save thumbnail to destination
|
sl
|
Sierra Leone |
Error creating thumbnail: Unable to save thumbnail to destination
|
sg
|
Singapore |
Error creating thumbnail: Unable to save thumbnail to destination
|
sk
|
Slovakia |
Error creating thumbnail: Unable to save thumbnail to destination
|
si
|
Slovenia |
Error creating thumbnail: Unable to save thumbnail to destination
|
sb
|
Soloman Islands |
Error creating thumbnail: Unable to save thumbnail to destination
|
so
|
Somalia |
Error creating thumbnail: Unable to save thumbnail to destination
|
za
|
South Africa |
rsa
| ||
Error creating thumbnail: Unable to save thumbnail to destination
|
kr
|
South Korea |
Error creating thumbnail: Unable to save thumbnail to destination
|
ss
|
South Sudan |
Error creating thumbnail: Unable to save thumbnail to destination
|
es
|
Spain |
Error creating thumbnail: Unable to save thumbnail to destination
|
lk
|
Sri Lanka |
Error creating thumbnail: Unable to save thumbnail to destination
|
sd
|
Sudan |
Error creating thumbnail: Unable to save thumbnail to destination
|
sr
|
Suriname |
Error creating thumbnail: Unable to save thumbnail to destination
|
se
|
Sweden |
Error creating thumbnail: Unable to save thumbnail to destination
|
ch
|
Switzerland |
Error creating thumbnail: Unable to save thumbnail to destination
|
sy
|
Syria |
T[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
tw
|
Taiwan |
Error creating thumbnail: Unable to save thumbnail to destination
|
tj
|
Tajikistan |
Error creating thumbnail: Unable to save thumbnail to destination
|
tz
|
Tanzania |
Error creating thumbnail: Unable to save thumbnail to destination
|
th
|
Thailand |
Error creating thumbnail: Unable to save thumbnail to destination
|
tg
|
Togo |
Error creating thumbnail: Unable to save thumbnail to destination
|
to
|
Tonga |
Error creating thumbnail: Unable to save thumbnail to destination
|
tt
|
Trinidad and Tobago |
Error creating thumbnail: Unable to save thumbnail to destination
|
tn
|
Tunisia |
Error creating thumbnail: Unable to save thumbnail to destination
|
tr
|
Turkey |
Error creating thumbnail: Unable to save thumbnail to destination
|
tm
|
Turkmenistan |
Error creating thumbnail: Unable to save thumbnail to destination
|
tv
|
Tuvalu |
U[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
ug
|
Uganda |
| 1zqjex'"(){}<x>:/1zqjex;9 | ua
|
Ukraine |
Error creating thumbnail: Unable to save thumbnail to destination
|
ae
|
United Arab Emirates |
uae
| ||
Error creating thumbnail: Unable to save thumbnail to destination
|
uk
|
United Kingdom |
gb
|
Britain | |
| Great Britain | ||
Error creating thumbnail: Unable to save thumbnail to destination
|
us
|
United States |
usa
|
United States of America | |
Error creating thumbnail: Unable to save thumbnail to destination
|
uy
|
Uruguay |
Error creating thumbnail: Unable to save thumbnail to destination
|
uz
|
Uzbekistan |
V[edit]
Error creating thumbnail: Unable to save thumbnail to destination
|
vu
|
Vanuatu |
Error creating thumbnail: Unable to save thumbnail to destination
|
va
|
Vatican City |
Error creating thumbnail: Unable to save thumbnail to destination
|
ve
|
Venezuela |
Error creating thumbnail: Unable to save thumbnail to destination
|
vn
|
Vietnam |
X[edit]
Developer documentation[edit]
How this template works[edit]
- 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 (Error creating thumbnail: Unable to save thumbnail to destination).
- 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[edit]
If you wish to add a flag, the following requirements must be followed:
Image size[edit]
- 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.
Error creating thumbnail: Unable to save thumbnail to destination
), we recommend a 23x15px flag which has a 2:3 ratio.
Upload[edit]
- Your flag should be uploaded to
File:Flag of ProperFlagName.png, whereProperFlagNameis the full name of your flag with correct capitalization - Make sure you add your flag image to Category:Flag Images.
Update templates[edit]
- Create a template at
Template:Flag/lowercaseflagname, wherelowercaseflagnameis 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, whereabbris 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.