Template:Flagicon/doc

From Wikipedia, the free encyclopedia

This is the template documentation page for Template:Flagicon.

This page is not necessarily intended to be viewed directly. If it uses variables, some links may appear broken. Do not replace these variables with hardcoded page names or URLs.

Displays the flag of a country with an alt text "Flag of <countryname>" (the alt text is displayed if you hover the mouse over the flag image. It is also read by screen reader software).

The first parameter is mandatory and identifies the name of the country.

Examples:

  • {{flagicon|Italy}} = Flag of Italy
  • {{flagicon|ITA}} = Flag of Italy

Optional parameters:

  • {{flagicon|Italy|size=40px}} = Flag of Italy — to use a non-default flag size

[edit] Implementation

This template uses the data templates listed under category:country data templates, which contain the data what to display (Example: template:country data Italy) and the formatter template:country flagicon2, which contains the logic how to display the country data.

[edit] Related templates

  • Template:flag is used to display a wikilinked name next to the flag. The displayed name will be the same as the parameter used with the template, but the link target will be the main article for the country (in these examples, Italy).
  • Template:flagcountry is also used to display a wikilinked name next to the flag. The displayed name will always be the same, regardless of whether or not a country code alias is used as the template parameter.

[edit] See also