Template:Flagicon

From Wikipedia, the free encyclopedia

{{country data {{{1}}} | country flagicon2 | countryname = {{{1}}} | variant = | size = | name =

}}

The template documentation below is transcluded from Template:Flagicon/doc [edit]

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

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.

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.

See also


This high-risk template has been protected from editing to prevent vandalism. (protection log). Please discuss changes on the talk page or request unprotection. You may use {{editprotected}} on the talk page to ask for an administrator to make an edit for you.