Home
Random
Recent changes
Special pages
Community portal
Preferences
About Stockhub
Disclaimers
Search
User menu
Talk
Contributions
Create account
Log in
Editing
Module:ISO 3166/doc
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Subdivisions (ISO 3166-2)=== Inputs to <code>name</code> must be valid [[ISO 3166-2]] codes, i.e. the country's alpha-2 code for the first part, and up to three alphanumeric characters for the second part. They may be given normally (with a hyphen between the parts), or split between two unnamed parameters. For <code>code</code>, the first parameter is the country name (or any of its three codes, like above), and the second the subdivision name. ====Code (alpha-2)==== To get the alpha-2 code of a subdivision use the code function with parameter 1 being the country and parameter 2 being the subdivision *{{tnull|#invoke:ISO 3166|code|United Kingdom|England}} → {{#invoke:ISO 3166|code|United Kingdom|England}} *{{tnull|#invoke:ISO 3166|code|GBR|England}} → {{#invoke:ISO 3166|code|GBR|England}} *{{tnull|#invoke:ISO 3166|code|GB|England}} → {{#invoke:ISO 3166|code|GB|England}} ====Name==== To get the name of a subdivision use the name function with parameter 1 being the country and parameter 2 being the subdivsion '''or''' parameter 1 being the subdivsion code *{{tnull|#invoke:ISO 3166|name|GB-ENG}} → {{#invoke:ISO 3166|name|GB-ENG}} *{{tnull|#invoke:ISO 3166|name|GB|ENG}} → {{#invoke:ISO 3166|name|GB|ENG}} {{para|isoname}} works for subnational entities as well; keep in mind that ISO 3166-2 uses (transliterations of) local names that may differ from English ones. Set {{para|lang}} to a [[ISO 639|language code]] to switch between different languages for entities that have multiple ISO names. The default language for multilingual entities can be set on the country's [[Module:ISO 3166/data|data page]]. *{{tnull|#invoke:ISO 3166|name|BE|BRU}} → {{#invoke:ISO 3166|name|BE|BRU}} *{{tnull|#invoke:ISO 3166|name|BE|BRU|isoname{{=}}yes}} → {{#invoke:ISO 3166|name|BE|BRU|isoname=yes}} *{{tnull|#invoke:ISO 3166|name|BE|BRU|lang{{=}}fr}} → {{#invoke:ISO 3166|name|BE|BRU|lang=fr}} *{{tnull|#invoke:ISO 3166|name|BE|BRU|lang{{=}}nl}} → {{#invoke:ISO 3166|name|BE|BRU|lang=nl}}
Summary:
Please note that all contributions to Stockhub may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Stockhub:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)