Template:Country
From Wikipedia, the free encyclopedia
{{country data {{{2}}} | country {{{1}}}2 | countryname = {{{2}}} | variant = | size = | name =
}}
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
Examples:
{{country|flagcountry|France}} = France→ use: {{flagcountry|France}} = France{{country|flagicon|France}} =→ use: {{flagicon|France}} ={{country|flag|France}} = France→ use: {{flag|France}} = France- {{country|name|France}} = France
Using an alias name for the country:
{{country|flagcountry|FRA}} = France→ use: {{flagcountry|FRA}} = France{{country|flagicon|FRA}} =→ use: {{flagicon|FRA}} ={{country|flag|FRA}} = FRA→ use: {{flag|FRA}} = 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}} = France→ use: {{flagcountry|France|size=40px}} = France{{country|flagicon|France|size=40px}} =→ use: {{flagicon|France|size=40px}} =
An optional "name" parameter can be given to override the text of the link:
{{country|flagcountry|France}} = France→ use: {{flagcountry|France}} = France{{country|flagcountry|France|name=C'est la France}} = C'est la France→ use: {{flagcountry|France|name=C'est la 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}} = France | |
{{flagcountry|FRA}} = France | template:country data France | (redirects to
Formatters
The "how to display" logic is separated into formatter templates (these contain no data besides some defaults):
Call | Formatter template used |
---|---|
{{flagcountry|France}} = France | |
{{flagicon|France}} = | |
{{flag|France}} = France | |
{{country|name|France}} = France |