الگو:CountryAbbr2/توضیحات
این زیرصفحهٔ مستندات الگو:CountryAbbr2 است. این شامل اطلاعات استفاده، الگوها، پیوندهای بین زبانی و سایر اطلاعات است که در اصل الگو صفحه قرار نمیگیرد. |
The {{CountryAbbr2}} template attempts to generate the ایزو ۳۱۶۶-۱ آلفا-۲ or ایزو ۳۱۶۶-۲ code for a named country or geographic region, for use in the region:
parameter of {{Coord}}. It attempts a ایزو ۳۱۶۶-۲ region code for locations in Canada, France, Germany, India, and the United States. It attempts a ایزو ۳۱۶۶-۱ آلفا-۲ 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:
- {{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
ویرایش- {{CountryAbbr}}
Implementation notes
ویرایش{{CountryAbbr2}}
sometimes invokes a helper template:
A nation's flag data is matched to the flag+wikilink as in:
{{flag|nation}}
- shows flag + wikilinked nation name{{country flag2|alias=Canada | name=Canada| flag alias=Flag of Canada.svg}}
- invoked inside {flag}
Each nation's flag can be specified by a 3-letter flag template, such as: {{CAN}}, {{USA}}, {{FRA}}, {{POL}}, {{PRC}}, {{JPN}}, {{WAL}}, etc.