Difference between revisions of "Template:Flag/doc"

From comp.tf
Jump to navigation Jump to search
Line 976: Line 976:
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
 
=== X ===
 
=== X ===
{| class="wikitable" style="text-align: center;"
+
<div style="width:273px"></div><!-- Div to keep tables aligned. Delete this if adding a table -->
|-
 
| style="width: 29px;" |
 
| style="width: 44px;" |
 
| style="width: 160px;" |
 
|}
 
 
{{Box|break|padding=1em}}
 
{{Box|break|padding=1em}}
  

Revision as of 15:04, 11 May 2020

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

Usage

{{flag|name}}

name

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

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

Examples

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

Valid settings

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

Alternate names

These names are additional to those listed in the tables.

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

Alternate abbreviations

These abbreviations are additional to those listed in the tables.

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

England Northern Ireland Scotland Wales vs. United Kingdom

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

A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z

O

Oman om Oman

Q

Qatar qa Qatar

X

Y

Yemen ye Yemen


Adding a flag

If you wish to add a flag, the following requirements must be followed

Image size

  • Width: equal or less than 23px
  • Height: equal or less than 15px
  • Aspect ratio: retained from source flag

If your flag is a custom flag (e.g. North America), we recommend a 23x15px flag which has a 2:3 ratio.

Upload

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

Update templates

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