வார்ப்புரு:ConvertAbbrev/doc
{{Documentation subpage}}
 This template is used to convert commonly abbreviated things such as countries, states, provinces, and even language codes to and from their abbreviations. A hierarchical tree of subtemplates allows this template to convert virtually anything, which is really good for use in a backdoor template. If you have the word &quot;California&quot;, but the template you're trying to use will only recognize &quot;CA&quot;, use this to convert it!
 
 ==How to use the template==
 '''Syntax:''' {{Tlx|ConvertAbbrev|datatype|specification|value|force{{=}}''abbr'' or ''long''}}
 
 This template consists of a &quot;tree&quot; of subtemplates containing databases of abbreviations. Each successive parameter in the code input tells the template which database to query. The ''datatype'' parameter is the most broad and tells the template what type of information you are looking for (i.e. Countries, states, or languages). The ''specification'' parameter refines the search. For example, if the ''datatype'' parameter is &quot;ISO 3166-1&quot;, that tells the template to look for a subtype (alpha2, alpha3, or numeric). If the ''datatype'' parameter is &quot;ISO 3166-2&quot;, the template will look for a specific country (Canada, Mexico, United States, etc.). If the ''datatype'' parameter is &quot;ISO 639-1&quot;, the template looks for the name of a language (English, Spanish, Zulu, etc.). The ''value'' parameter is the actual name or abbreviation the user wishes to convert.
 
 The force parameter overrides the normal nature of the conversion and forces an '''abbr'''eviation or a '''long''' word to be returned. This is useful when a user may input either an abbreviation or a full name, but the template in question can only accept one of them.
 
 If the ISO codes are a little hard to remember, there are also shortcuts:
 *{{Tlx|ConvertAbbrev|ISO 3166-1|alpha-2|__country__}} can also be called by
 **{{Tlx|ConvertAbbrev|Countries|alpha-2|__country__}} or
 **{{Tlx|ConvertAbbrev|Countries|__country__}}.&lt;br /&gt;&lt;small&gt;'''Note:''' The default for country abbreviations is alpha-2. For alpha-3 and numeric abbreviations, the user must specify the type in the ''specification'' parameter.&lt;/small&gt;
 *{{Tlx|ConvertAbbrev|ISO 3166-2|CA|__province__}} can also be called by
 **{{Tlx|ConvertAbbrev|Countries|CA|__province__}},
 **{{Tlx|ConvertAbbrev|Countries|Canada|__province__}},
 **{{Tlx|ConvertAbbrev|Canada|__province__}}, or
 **{{Tlx|ConvertAbbrev|CN|__province__}}.
 *{{Tlx|ConvertAbbrev|ISO 639-1|__language__}} can also be called by
 **{{Tlx|ConvertAbbrev|Languages|-1|__language__}} or
 **{{Tlx|ConvertAbbrev|Languages|__language__}}.&lt;br /&gt;&lt;small&gt;'''Note:''' The default for language abbreviations is ISO 639-1. For ISO 639-2 abbreviations, the user must specify the type in the ''specification'' parameter.&lt;/small&gt;
 *{{Tlx|ConvertAbbrev|ISO 639-2|__language__}} can also be called by
 **{{Tlx|ConvertAbbrev|Languages|-2|__language__}}.
 
 ==Supported datasets==
 * [[ISO 3166-1]] – Country abbreviations
 ** [[ISO 3166-1 alpha-2|alpha-2]] – Two-letter abbreviations
 ** [[ISO 3166-1 alpha-3|alpha-3]] – Three-letter abbreviations
 ** [[ISO 3166-1 numeric|numeric]] – Numeric equations
 [[File:ConvertAbbrev Progress.svg|thumb|400px|Countries supported in ISO 3166-2:&lt;br /&gt;{{color box|#00ff00}} Supported&lt;br /&gt;{{color box|#b9b9b9}} Not yet supported&lt;br /&gt;{{color box|#ff0000}} Does not exist in ISO 3166-2]]
 * [[ISO 3166-2]] – State/provincial abbreviations&lt;br /&gt;&lt;small&gt;'''Note:''' All [[ISO 3166-2]] codes should not include the 3166-1 country code in the ''value'' parameter. (e.g. If you're looking for [[Paris]] [&quot;FR-75&quot; in [[ISO 3166-2:FR]]], you should only type &quot;75&quot; and not &quot;FR-75&quot;.)&lt;/small&gt;
 ** [[ISO 3166-2:AU]] – [[States and territories of Australia]]
 ** [[ISO 3166-2:BD]] – [[Districts of Bangladesh]]
 ** [[ISO 3166-2:BR]] – [[States of Brazil]]
 ** [[ISO 3166-2:CA]] – [[Canadian subnational postal abbreviations]]
 ** [[ISO 3166-2:CN]] – [[Administrative divisions of China]]
 ** [[ISO 3166-2:DE]] – [[States of Germany]]
 ** [[ISO 3166-2:EG]] – [[Governorates of Egypt]]
 ** [[ISO 3166-2:ES]] – [[Provinces of Spain]]
 ** [[ISO 3166-2:FR]] – [[Departments of France]]
 ** [[ISO 3166-2:GB]] – [[Administrative geography of the United Kingdom]]
 ** [[ISO 3166-2:ID]] – [[Provinces of Indonesia]]
 ** [[ISO 3166-2:IE]] – [[Counties of Ireland]]
 ** [[ISO 3166-2:IN]] – [[States and territories of India]]
 ** [[ISO 3166-2:IT]] – [[Provinces of Italy]]
 ** [[ISO 3166-2:JP]] – [[Prefectures of Japan]]
 ** [[ISO 3166-2:MX]] – [[Political divisions of Mexico]]
 ** [[ISO 3166-2:NG]] – [[States of Nigeria]]
 ** [[ISO 3166-2:PK]] – [[Administrative units of Pakistan]]
 ** [[ISO 3166-2:RU]] – [[Federal subjects of Russia]]
 ** [[ISO 3166-2:TR]] – [[Provinces of Turkey]]
 ** [[ISO 3166-2:US]] – [[United States postal abbreviations]]
 ** [[ISO 3166-2:VN]] – [[Provinces of Vietnam]]
 * [[ISO 639]] – [[Language code]]s
 ** [[ISO 639-1]] – Two letter codes
 ** [[ISO 639-2]] – Three letter codes
 
 == Usage Examples ==
 &lt;table style=&quot;background:transparent&quot;&gt;
 &lt;tr&gt;
 &lt;td&gt;&lt;table class=&quot;wikitable&quot;&gt;
  &lt;caption&gt;'''From Name to Abbreviation'''&lt;/caption&gt;
  &lt;th&gt;Code&lt;/th&gt;
  &lt;th&gt;Returns&lt;/th&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|ISO 3166-1|alpha-2|United Kingdom}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|ISO 3166-1|alpha-2|United Kingdom}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|Countries|alpha-3|United States}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|Countries|alpha-3|United States}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|ISO 3166-2|CA|Alberta}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|ISO 3166-2|CA|Alberta}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|Countries|Mexico|Federal District}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|Countries|Mexico|Federal District}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|ISO 639-1|Russian}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|ISO 639-1|Russian}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|Languages|Chinese}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|Languages|Chinese}}&lt;/td&gt;
  &lt;/tr&gt;
 &lt;/table&gt;&lt;/td&gt;
 &lt;td&gt;&lt;table class=&quot;wikitable&quot;&gt;
  &lt;caption&gt;'''From Abbreviation to Name'''&lt;/caption&gt;
  &lt;th&gt;Code&lt;/th&gt;
  &lt;th&gt;Returns&lt;/th&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|ISO 3166-1|alpha-2|GB}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|ISO 3166-1|alpha-2|GB}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|Countries|alpha-3|USA}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|Countries|alpha-3|USA}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|ISO 3166-2|CA|AB}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|ISO 3166-2|CA|AB}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|Countries|Mexico|DF}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|Countries|Mexico|DF}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|ISO 639-1|ru}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|ISO 639-1|ru}}&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
   &lt;td&gt;&lt;code&gt;&lt;nowiki&gt;{{ConvertAbbrev|Languages|zh}}&lt;/nowiki&gt;&lt;/code&gt;&lt;/td&gt;
   &lt;td&gt;{{ConvertAbbrev|Languages|zh}}&lt;/td&gt;
  &lt;/tr&gt;
 &lt;/table&gt;&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/table&gt;
 
 ==Sub-pages==
 For a list of all the sub-pages of this template, see: