टेम्पलेट:CountryAbbr/doc
ई टेम्पलेट:CountryAbbr के प्रलेखन उपपन्ना ह। इहाँ उपयोग खातिर जानकारी, श्रेणी सभ आ अउरी दूसर सामग्री मौजूद बा जेवन की मूल टेम्पलेट पन्ना के हिस्सा ना हवे। |
The {{CountryAbbr}} template attempts to generate the ISO 3166-1 alpha-2 or ISO 3166-2 code for a named country or geographic region, for use in the 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}}
- {{Infobox settlement}}
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
- {{IndAbbr}} - states, etc. of India
इहो देखल जाय
संपादन करीं- {{ISO 3166 code}} returns the ISO code given country name and, optionally, subdivision name. For example:
{{ISO 3166 code|France|Paris}}
returns . Covers all ISO 3166-1 and ISO 3166-2 codes.