साँचा:CountryAbbr2/doc

मुक्त ज्ञानकोश विकिपीडिया से
नेविगेशन पर जाएँ खोज पर जाएँ

{{

 साँचा:namespace detect

| type = notice | image = | imageright = | class = | style = margin-bottom:1.0em; | textstyle = | text = साँचा:strong for साँचा:terminate sentence
It contains usage information, categories and other content that is not part of the original साँचा page. | small = | smallimage = | smallimageright = | smalltext = | subst = | date = | name = }}

The साँचा:tl 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 साँचा:tl. It attempts a ISO 3166-2 region code for locations in Canada, France, Germany, India, and the United States. It attempts a 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:

  • {{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

Implementation notes

साँचा:tlx sometimes invokes a helper template:

A nation's flag data is matched to the flag+wikilink as in:

Each nation's flag can be specified by a 3-letter flag template, such as: {{CAN}}, {{USA}}, {{FRA}}, {{POL}}, {{PRC}}, {{JPN}}, {{WAL}}, etc.