ފަންވަތް:CountryAbbr
This template is used on 100,000+ pages. To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its /sandbox or /testcases subpages, or in your own user space. The tested changes can then be added to this page in one single edit. Please consider discussing any changes on the talk page before implementing them. |
region:
parameter of {{Coord}}. It attempts an ISO 3166-2 region code for locations in Canada, France, Germany, India, and the United States. It attempts an ISO 3166-1 alpha-2 country code for all other locations.
Parameters
The first (required) argument specifies the name of the country, such as "United States" or "Chile".
The second (optional) argument is the name of a state or province within the specified country, such as "Alaska".
Attempts have been made to recognize variations commonly seen in infoboxes, such as:
- [[Chile]]
- [[Image:Flag of Chile.svg|25px]] [[Chile]]
- {{CHL}}
- {{flag|Chile}}
So far, however, the template has failed to keep up with the ingenuity of infobox creators.
Bugs
Locations in Canada, India, and the United States generate invalid region codes (CA-X, IN-X, and US-X) if the second argument is omitted, blank, or invalid.
Used in
{{Geobox}}
{{Infobox building}}
Implementation notes
{{CountryAbbr}} can handle many inputs simply and directly. In some cases, however, it invokes a helper template:
{{CountryAbbr2}} - (expensive) cases where the first parameter is a template
{{CanAbbr2}} - provinces, territories, etc. of Canada
{{FraAbbr}} - departments, etc. of France
{{IndAbbr}} - states, etc. of India
{{StateAbbr}} - states, districts, etc. of the United States
See also
{{ISO 3166 code|France|Paris}}
returns Lua error in package.lua at line 80: module 'Module:ISO 3166/data/FR' not found.. Covers all ISO 3166-1 and ISO 3166-2 codes.
The above documentation is transcluded from ފަންވަތް:CountryAbbr/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |