ଉଇକିମିଡ଼ିଆ ଛାଞ୍ଚ From Wikipedia, the free encyclopedia
This template uses Lua: |
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.
There is one required parameter and three optional parameters.
country
/1
flag
yes
, will return the flag of the country.year
games
Here are some examples based on the entry for Italy (ITA)
ITA = {
name = "Italy",
{1946, "Flag of Italy (1861-1946).svg"},
{2002, "Flag of Italy.svg"},
{2006, "Flag of Italy (2003-2006).svg"},
"Flag of Italy.svg",
["Summer Olympics"] = {
[1980] = "Olympic flag.svg",
},
{{Country alias|ITA}}
→ Italy{{Country alias|ITA|flag=yes}}
→ Flag of Italy.svg{{Country alias|ITA|flag=yes|year=1946}}
→ Flag of Italy (1861-1946).svg{{Country alias|ITA|flag=yes|year=1947}}
→ Flag of Italy.svg{{Country alias|ITA|flag=yes|year=1980|games=Summer Olympics}}
→ Olympic flag.svg{{Country alias|ITA|flag=yes|year=2006|games=Summer Olympics}}
→ Flag of Italy (2003–2006).svgNote that in the last example games
does not factor into the flag image.
If the country code is not supplied, or does not exist in the module, an error will be returned:
{{Country alias}}
→ Lua error in ମଡ୍ୟୁଲ:Country_alias at line 202: Invalid country alias: {{{country}}}.{{Country alias}}
→ Lua error in ମଡ୍ୟୁଲ:Country_alias at line 202: Invalid country alias: nil.{{Country alias|EXZ}}
→ Lua error in ମଡ୍ୟୁଲ:Country_alias at line 202: Invalid country alias: EXZ.{{Country alias|country=EXZ}}
→ Lua error in ମଡ୍ୟୁଲ:Country_alias at line 202: Invalid country alias: EXZ.To avoid generating a script error, use |error=value
.
{{Country alias|EXZ|error=ERROR}}
→ ERROR
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.