ထႅမ်းပလဵတ်ႉ:Country alias/doc
ၼႃႈလိၵ်ႈဢၼ်ၼႆႉၼႆႉ မၼ်းပဵၼ် ၽိုၼ်ၵႅမ်မိုဝ်း လၢႆးၸႂ်ႉတိုဝ်း (documentation) ႁင်း တွၼ်ႈတႃႇ ၼႃႈလိၵ်ႈၽႄ (subpage) ထႅမ်းပလဵတ်ႉ:Country alias ၼၼ်ႉယဝ်ႉ။ တီႈၼႃႈလိၵ်ႈဢၼ်ၼႆႉၼႆႉ မၼ်းတေၶဝ်ႈပႃးဝႆႉ လၢႆးၸႂ်ႉတိုဝ်း လႄႈ ၶေႃႈၶၢဝ်ႇဢၼ်ၵဵဝ်ႇၵပ်း၊ ပိူင်ထၢၼ်ႈ လႄႈ ၶေႃႈမုၼ်းတၢင်ႇၸိူဝ်း ဢၼ်ဢမ်ႇၵဵဝ်ႇၵပ်း တင်း ထႅမ်းပလဵတ်ႉ page ၼၼ်ႉယဝ်ႉ။ |
ထႅမ်းပလဵတ်ႉ ဢၼ်ၼႆႉ လႆႈၸႂ်ႉဝႆႉ တီႈၼႃႈလိၵ်ႈ မွၵ်ႈ 16,000 ၼႃႈလိၵ်ႈ လႄႈ လွင်ႈလႅၵ်ႈလၢႆႈၸိူဝ်းၼႆႉ တေႁႂ်ႈၽၢင်ႉမႅၼ်ႈၺႃး ၵႂၢင်ႈၵႂၢင်ႈၶႂၢင်ၶႂၢင်။ ၸၢမ်းတူၺ်း လွင်ႈလႅၵ်ႈလၢႆႈ တီႈၼႂ်း ထႅမ်းပလဵတ်ႉ's /sandbox ဢမ်ႇၼၼ် ၼႃႈလိၵ်ႈၽႄ /testcases , ဢမ်ႇၼၼ် တီႈၼႂ်း ၼႃႈလိၵ်ႈၽႄ ၽူႈၸႂ်ႉတိုဝ်း။ ဝူၼ်ႉသွၼ်ႇ ဢုပ်ႇဢူဝ်း လွင်ႈလႅၵ်ႈလၢႆႈ တီႈၼႂ်း ၼႃႈလိၵ်ႈ တႃႇဢုပ်ႇ ၽွင်းမိူဝ်ႈပႆႇ ၵေႃႇသၢင်ႈၶဝ်ၼၼ်ႉ။
ႁူဝ်ၼပ်ႉ လွင်ႈၶဝ်ႈပႃးၼႆႉ မၼ်းႁဵတ်းဢၢပ်ႉတဵတ်ႉဝႆႉႁင်းမၼ်း (တူၺ်းတီႈ ၽိုၼ်လိၵ်ႈ)။ |
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
- The three-letter country code used by IOC, CGF, or FINA. This parameter can be an unnamed parameter.
flag
- 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}}
→ 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).svg
Note that in the last example games
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:
{{Country alias}}
→ Lua error in Module:Country_alias at line 202: Invalid country alias: {{{country}}}.
{{Country alias| }}
→ Lua error in Module:Country_alias at line 202: Invalid country alias: nil.
{{Country alias|EXZ}}
→ Lua error in Module:Country_alias at line 202: Invalid country alias: EXZ.
{{Country alias|country=EXZ}}
→ Lua error in Module:Country_alias at line 202: Invalid country alias: EXZ.
To avoid generating a script error, use |error=value
.
{{Country alias|EXZ|error=ERROR}}
→ ERROR