Kontent qismiga oʻtish

Andoza:Country alias

Vikipediya, ochiq ensiklopediya
Documentation icon Andoza hujjati[koʻrib chiqish] [tahrirlash] [tarix] [yangilash]

Ushbu andoza mamlakat nomi va bayrog'ini aks ettirib beradi.

{{Country alias}} Olimpiada oʻyinlari, Hamdoʻstlik oʻyinlari, Osiyo oʻyinlari andozalari uchun.

Ishlatilishi

[manbasini tahrirlash]
davlat nomi/1
uch harfli kod, CGF kod, FINA kodi.
bayroq
If set to yes, will return the flag of the country.
year
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".
games
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.

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}} → Italiya
  • {{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).svg

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

Lua script error messages

[manbasini tahrirlash]

If the country code is not supplied, or does not exist in the module, an error will be returned:

  • {{Country alias}}Lua xatosi in Modul:Country_alias at line 202: Invalid country alias: {{{country}}}.
  • {{Country alias|}}Lua xatosi in Modul:Country_alias at line 202: Invalid country alias: nil.
  • {{Country alias|EXZ}}Lua xatosi in Modul:Country_alias at line 202: Invalid country alias: EXZ.
  • {{Country alias|country=EXZ}}Lua xatosi in Modul:Country_alias at line 202: Invalid country alias: EXZ.