Kids encyclopedia facts:Flag help facts for kids

Kids Encyclopedia Facts - Homework Help


Main flag templates

Basic usage of the main flag templates.

Flag

The template {{Flag}} will display two things. An icon (a small image) of a flag, and a wikilink to the article (page) of the country. The name of the country is the first parameter passed to the template.

Example: {{flag|Poland}} Poland
Example: {{flag|United Kingdom}} United Kingdom

Flagicon

The template {{Flagicon}} will display an icon (a small image) of a flag. The name of the country is the first parameter passed to the template.

Example: {{flagicon|Japan}}Japan
Example: {{flagicon|Poland}}Poland

Differences between flagicon on english and simple wikipedia

In en:wikipedia, the flag icon is a wikilink to the article about the country. In simple:wikipedia, the flag icon is a wikilink to the full-sized image on wikimedia commons.

Flagcountry

Currently

The template {{Flagcountry}} does the same thing as {{Flagicon}}

Future

The template {{Flagcountry}} will an icon of a flag, and a wikilink to the article (page) of the country. The display format is the same as {{Flag}}, but the common name of the country is used, even if an alternate name or code is used (see Alternate names below). The name of the country is the first parameter passed to the template.

Example: {{flagcountry|USA}} United States United States
Example: {{flagcountry|POL}} Poland Poland

Shortcut flag templates

Many countries have individual flag templates. These are shortcut flag templates. The template is named using standard three-letter country code. This is a "shortcut" to using the standard Flagicon template.

Currently

Example: {{AFG}} Afghanistan (equivalent to {{flagicon|Afghanistan}})

Future

There are good things and bad things about using the shortcut flag templates.

  • Some country codes, like "USA", are widely known. Using the shortcut templates {{USA}} makes coding a page easier and faster.
  • Many country codes are obscure (very few people know them). The wiki markup would be easier to code and read if the country names were used in full.
  • The shortcut templates do not allow the use historical flag variants (described below). This makes them less flexible.

List of shortcut templates

See Category:Flag templates for a complete list.

Flag names

The first parameter for the {{Flagicon}}, {{Flag}}, and {{Flagcountry}} templates is the country name to be used for the flag image. These country names identify additional templates that store information about that country. For example, the image name and main article name used by {{flag|Cuba}} (to produce  Cuba) is stored in Template:Country data Cuba. The complete set of these "country data" templates is found in Category:Country data templates.

For this discussion, all areas will be called countries.

There are also country data templates for entities that are not considered countries. These other entities can be things such as international organizations, multi-national organizations, state names, province names, or territory names. The use of country in these template names is because the wikicode of the flag template system was built upon {{Country}}. The flag template system was expanded to include these other entities, so the country name had to be used.

Some examples of non-country flag templates are:

Many country data templates also have historical nations. These templates may be used to display the historical flags with wikilinks to the appropriate articles. Some examples are:

Alias names

To make writing wikicode for the flag templates easier, many flags can be identified by an alias name. This alias name is typically a three-letter country code.

Example{{flagicon|United States}}, may be replaced with {{flagicon|USA}} to produce United States.

Alias names are available for almost every nation listed in ISO 3166-1 alpha-3 (the international list of country codes), the list of IOC country codes, and the list of FIFA country codes. For example, {{flagicon|DEU}} and {{flagicon|GER}} both produce Germany.

A small group of other well-known abbreviations are also available (such as UK for the United Kingdom, EU for the European Union, and USSR for the Soviet Union.

To find the country code aliases for a country, look at the Country data template for that country. For example, Template:Country data Germany has a section named Redirect aliases. In that section, the codes DEU and GER are listed. These are the country code aliases that may be used to display the German flag.

When using country code aliases, template {{flag}} will display the country code for the wikilink text. For example:

  • {{flag|USA}} USA
  • {{flag|UK}} UK
  • {{flag|CHN}} CHN

Note that in each case, the target wikilink is the correct article (i.e. United States, United Kingdom, and People's Republic of China, respectively). This may be the desired effect, such as in column headings of a large table, but if the full name is wanted, then use {{Flagcountry}} instead. This feature is not function at the current time.


Flag variants

Many countries have had different flags in their history. The flag template system can store many flag variants (different versions) inside country data templates. A flag variant is selected by adding an additional parameter to the standard flag templates. This parameter is usually given as the second parameter to the template, but may also be given as the variant named parameter.

Examples
  • {{flag|Germany|empire}} Germany
  • {{flag|Germany|variant=empire}} Germany
  • {{flagcountry|CAN|1921}} Canada
  • {{flagicon|CAN|1921}}Canada

The flag variants (if any) for a country are documented on the country data template page itself. Each variant is identified by a label, such as empire or 1921 in the examples above. Usually, the label identifies the year in which the flag was first used, but this is not a requirement.

Other common parameters

Size

The normal size for all flag icons is 22x20px, with a one pixel border. This means that the flag icon will be no more than 22 pixels wide, and no more than 20 pixels tall. Most flags have a horizontal layout (they are wider than they are tall). For these flags the 22 pixel width limits the icon size. This size was picked to display the best looking flag icons for most uses.

Sometimes, it might be better to display a larger or smaller icon. To change the flag icon size, use the size= parameter. Enter the size followed by the letters px. The size my be the maximum width and or height of the icon.

size= parameter
value what is limited
40px maximum width is 40 pixels
100x50px maximum width is 100 pixels
maximum height is 40 pixels
whichever comes first
x200 maximum height is 200 pixels
Examples
  • {{flagicon|Brazil|size=40px}}Brazil
  • {{flag|Italy}} Italy
  • {{flag|Italy|size=15px}} Italy

Name

The text of the wikilink is usually generated by the template, but can always be changed with the name parameter.

Examples
  • {{flag|South Korea|name=Korea}} Korea (this name is used in several sports)
  • {{flag|ROC|name=China}} China (China from 1912 to 1949)

Other flag templates

Flaglink

The template {{Flaglink}} is similar to flagcountry, but it adds to the wikilink by adding a suffix after the country name. This is useful when a series of per-country articles exist for a main topic.

Examples
  • {{flaglink|Serbia|in the Eurovision Song Contest 2007}} Serbia
  • {{flaglink|AUS|at the 2002 Commonwealth Games}} Australia

Military flag templates

Army

{{Army}} template is used to display the army flag of a country. The army flag is coded in the country data template. The link to the country's article for their army is also coded in the country data template.

Example: {{Army|North Korea}} Korean People's Army

Air force

{{Air force}} template is used to display the air force flag of a country. The air force flag is coded in the country data template. The link to the country's article for their air force is also coded in the country data template.

Example: {{Air force|Poland}}Flag of the Polish Air Force Polish Air Force

Navy

{{Navy}} template is used to display the naval ensign of a country. The naval ensign is coded in the country data template. The link to the country's article for their navy is also coded in the country data template.

Example: {{Navy|Poland}} Polish Navy
Example: {{Navy|Poland|1919}} Polish Navy

National sport team flag templates

A common use of the flag icon templates on Wikipedia is for national sport teams. Several sets of sport-specific templates have been built into the flag template system:

These templates have short names because they are often used many times on one page. There are often several template in a set used for a given sport:

  • with a "w" suffix, links to women's national team articles
  • with a "-rt" suffix, displays the flag icon to the right of the nation's name
  • with a -big" suffix, displays the flag icon in larger size and the team name underneath the flag

For example, for football, the following templates are used:

Team Standard Right flag Big flag
Men's national teams {{fb}} {{fb-rt}} {{fb-big}}
Examples  Italy France 
Italy
Women's national teams {{fbw}} {{fbw-rt}} {{fbw-big}}
Examples Flag of Germany.svg Germany Brazil 
Germany

User preference to disable display of flag icons

If a users would not like to see the flag icons displayed, they can disable them. A CSS class is used within the internal formatting template, and the class setting can be changed from a user's personal monobook.css file.

Flag icon image display is disabled by:

.flagicon { display: none; }