Template:Country alias/doc

This template returns either a country name or the flag associated with that country, depending on the input parameters.

Country alias is primarily meant to be used for sporting competitions such as the Olympics, Commonwealth Games, Asian Games, etc.

Usage
There is one required parameter and three optional parameters.


 * / :The three-letter country code used by IOC, CGF, or FINA. This parameter can be an unnamed parameter.
 * :If set to, will return the flag of the country.
 * :The input year will determine which flag is used. For example, any year before 1999 will give "Pre-1999 Flag of Tunisia.svg" for Tunisia (TUN), while any year after 1999 will give "Flag of Tunisia.svg".
 * :This is another method of determining which flag is used. Some countries, such as Great Britain, used the Olympic flag during the 1980 Summer Olympics.

Examples
Here are some examples based on the entry for Italy (ITA)



Note that in the last example  does not factor into the flag image.

Lua script error messages
If the country code is not supplied, or does not exist in the module, an error will be returned: To avoid generating a script error, use value.