Template:Country/doc

From Wikipedia, the free encyclopedia

This is a documentation subpage for Template:Country (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

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

Contents

[edit] 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:

  • {{country|flagcountry|France}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

  → use: {{flagcountry|France}} = Flag of France France

  • {{country|flagicon|France}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

  → use: {{flagicon|France}} = Flag of France

  • {{country|flag|France}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

  → use: {{flag|France}} = Flag of France France

  • {{country|name|France}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.


Using an alias name for the country:

  • {{country|flagcountry|FRA}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

  → use: {{flagcountry|FRA}} = Flag of France France

  • {{country|flagicon|FRA}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

  → use: {{flagicon|FRA}} = Flag of France

  • {{country|flag|FRA}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

  → use: {{flag|FRA}} = Flag of France FRA

  • {{country|name|FRA}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.


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

  • {{country|get alias|France}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.
  • {{country|get alias|FRA}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.
  • {{country|get flag alias|France}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.
  • {{country|get flag alias|FRA}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.


[edit] Optional parameters

An optional "size" parameter can be given:

  • {{country|flagcountry|France|size=40px}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

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

  • {{country|flagicon|France|size=40px}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

  → 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}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

  → use: {{flagcountry|France}} = Flag of France France

  • {{country|flagcountry|France|name=C'est la France}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.

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

[edit] 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

[edit] 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}} =
The template {{Country/doc}} is deprecated. Please use {{Country}} instead.
This usage is deprecated. Please replace it with {{tdeprecated|Country/doc|Country}}.
The template {{Country}} is deprecated. Please use {{Flag}} instead.
Template:Country name2 (edit talk links history)