Template:Country showdata

Usage
This template is automatically invoked by the standard syntax of a country data template:

The first parameter to a country data template is usually the name of a formatting meta-template. For example, Template:Flag uses Template:Country flag2 to actually render the flag icon and wikilink. If the first parameter is missing, which is the case when a country data template is viewed directly, the template code fragment  ensures that this template will be used as the default first parameter. This technique ensures that country data templates are "self-documenting" if they use the standard syntax.

Additional parameters
Many country data templates require additional documentation beyond the standard mandatory alias and flag alias parameters. This template will automatically document standard optional parameters (such as shortname alias and/or alt attribute) if present, and can document unique optional parameters (such as flag variants) if instructed to. This latter method utilizes documentation-specific parameters in the country data template to activate the additional output from this template. These documentation parameters are set off from the rest of the parameters in the country data template by a  &lt;noinclude&gt;  section: &lt;noinclude&gt; &lt;/noinclude&gt;
 * var1 = ...
 * redir1 = ...
 * related1 = ...

Flag variants
Flag variants are added to a country data template by the inclusion of one or more flag alias-label parameters, where each label is a unique identifier that is subsequently used as an input parameter to  ... ,   </tt>, etc. To document these flag variants, use the varN</tt> documentation parameters to identify each label.

For example, Template:Country data Seychelles identifies three flag variants (in addition to the current flag) with the following code: These three variants are documented by the following code segment later in the template: &lt;noinclude&gt; ... &lt;/noinclude&gt; Up to nine flag variants can be documented by this method (using var1</tt> to var9</tt>). If more are present (and currently, only Template:Country data United States has more than nine flag variants), these can be listed on a separate documentation subpage as described below.
 * flag alias-1976 = Flag of the Seychelles 1976.svg
 * flag alias-1977 = Flag of the Seychelles 1977.svg
 * flag alias-colonial = Government Ensign of the United Kingdom.svg
 * var1 = 1976
 * var2 = 1977
 * var3 = colonial

Note that you do not have to use a varN</tt> parameter for the standard optional variant label naval</tt> (used for the country's naval ensign). If present, it will automatically be documented.

Redirect aliases
Many country data templates have alias names that can be used instead of the usual country name with all of the main flag templates. These are usually, but not exclusively, standard country code abbreviations such as those specifed in ISO 3166-1 alpha-3 or by the IOC or FIFA. These are implemented as redirects, and are listed in Category:Country data redirects.

For example, Template:Country data DEU and Template:Country data GER both redirect to Template:Country data Germany, because DEU is the ISO code and GER is the IOC and FIFA code for Germany. Therefore,  🇩🇪 </tt>,  🇩🇪 </tt>, and  🇩🇪 </tt> all have the same result. These redirect aliases are documented by the following template code fragment: &lt;noinclude&gt; ... ... &lt;/noinclude&gt;
 * redir1 = DEU
 * redir2 = GER

Related templates
Several country data templates are used for alternate forms to the common country data template for the nation, usually but not exclusively for historic nations. Pointers to these alternate templates are useful additions to the template documentation so that editors can use the correct template for their specific purposes.

For example, Template:Country data Serbia and Montenegro includes the following code to document three other related country data templates: &lt;noinclude&gt; ... ... &lt;/noinclude&gt;
 * related1 = Serbia
 * related2 = Montenegro
 * related3 = FR Yugoslavia