Template:ISO 3166 conversion template doc

Frae Wikipedia
Jump to navigation Jump to search
Template documentation[create]
Template documentation

[view] [edit] [purge]

Templates

ISO 3166-1

ISO 3166-1 alpha-2: {{ISO 3166 code}} (Eg: IR)
ISO 3166-1 alpha-3: {{ISO 3166 code-3}} (Eg: Template:ISO 3166 code-3)
ISO 3166-1 numeric: {{ISO 3166 numeric}} (Eg: Template:ISO 3166 numeric)

ISO 3166-2

ISO 3166-2: {{ISO 3166 code}} (Eg: IR-32)
ISO 3166-2 name: {{ISO 3166 name}} (Eg: Iran (Islamic Republic o))

Non-ISO 3166

Kintra name: {{Country name}} (Eg: Template:Country name)

Usage

This template is pairt o a series that resolves the kintra an subdiveesion names tae ISO 3166-1 an ISO 3166-2 codes, an vice versa.

ISO 3166

ISO 3166 defines names, twa an three letter codes an code nummers for aw kintras an sax chairacter codes (the twa letter kintra code follaed bi a dash an a twa or three chairacter subdiveesion code) for aw tap level subdiveesions.

Uising the faimily o templates

Whan we wish tae convert atween various identifiers that mey lowsely be defined as uiser inpit an ISO 3166 entities, thare mey be mair nor ane wey tae dae ilk conversion. For oor ensaumples we uise Pakistan as the kintra an Balochistan (Pakistan) as the subdiveesion.

The ISO-3166 identifiers for Pakistan are:

  • Name: Pakistan
  • Alpha-2 code: PK
  • Alpha-3 code: PAK
  • Numeric code: 586

The ISO-3166 identifiers for Balochistan (Pakistan) is:

  • Subdiveesion code:PK-BK

Nou Pakistan an aw haes a nummer o synonyms: for example Pakistán an پاکستان.

Seemilarly Baluchistan is kent, for ensaumple, as Balochistan (on Wikipaedia) an Bagh Sanjari.

Tae get the Alpha-2 code we can uise {{ISO 3166 code}} wi ony o the kintra identifiers.
Tae get the Alpha-3 code.
Findin the name o a kintra.
Findin the common name o a kintra.
Findin the numeric code o a kintra.
The subdiveesion code can be obteened in the follaein weys.