Template:Country

From Wikipedia, the free encyclopedia

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

}}

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

The {{country|Action|CountryName}} template is used to display various information about a country.

Contents

Required parameters

  • The first parameter is a "what to display" selector, supported are the values "flagcountry", "flagicon", "flag", "name"
  • The second parameter is the name of the country


Selectors "flagcountry", "flagicon" and "flag" shouldn't be used any longer. Please instead use the corresponding direct templates {{flagcountry}}, {{flagicon}} and {{flag}}.


Examples:

Using an alias name for the country:

  • {{country|flagcountry|FRA}} = Flag of France France   → use: {{flagcountry|FRA}} = Flag of France France
  • {{country|flagicon|FRA}} = Flag of France   → use: {{flagicon|FRA}} = Flag of France
  • {{country|flag|FRA}} = Flag of France FRA   → use: {{flag|FRA}} = Flag of France FRA
  • {{country|name|FRA}} = France


Accessing the values of the country data templates (see template:country data France):

  • {{country|get alias|France}} = France
  • {{country|get alias|FRA}} = France
  • {{country|get flag alias|France}} = Flag of France.svg
  • {{country|get flag alias|FRA}} = Flag of France.svg

Optional parameters

An optional "size" parameter can be given:

  • {{country|flagcountry|France|size=40px}} = Flag of France France   → use: {{flagcountry|France|size=40px}} = Flag of France France
  • {{country|flagicon|France|size=40px}} = Flag of France   → use: {{flagicon|France|size=40px}} = Flag of France

An optional "name" parameter can be given to override the text of the link:

  • {{country|flagcountry|France}} = Flag of France France   → use: {{flagcountry|France}} = Flag of France France
  • {{country|flagcountry|France|name=C'est la France}} = Flag of France C'est la France   → use: {{flagcountry|France|name=C'est la France}} = Flag of France C'est la France

Country data

The actual values what to display are stored in country data templates (see also Category:Country data templates), which are selected by the second parameter. Examples:

Call Country data template used
{{flagcountry|France}} = Flag of France France Template:Country data France (edit talk links history)
{{flagcountry|FRA}} = Flag of France France Template:Country data FRA (edit talk links history) (redirects to template:country data France

Formatters

The "how to display" logic is separated into formatter templates (these contain no data besides some defaults):

Call Formatter template used
{{flagcountry|France}} = Flag of France France Template:Country flagcountry2 (edit talk links history)
{{flagicon|France}} = Flag of France Template:Country flagicon2 (edit talk links history)
{{flag|France}} = Flag of France France Template:Country flag2 (edit talk links history)
{{country|name|France}} = France Template:Country name2 (edit talk links history)
In other languages