Template talk:ConvertAbbrev

From WikiAlpha
Jump to: navigation, search

(cur | prev) 23:51, 22 June 2017‎ Plastikspork (talk | contribs)‎ . . (3,945 bytes) (-223)‎ . . (TFD closed as no consensus (XFDcloser))
(cur | prev) 20:35, 14 June 2017‎ Plastikspork (talk | contribs)‎ . . (4,168 bytes) (+1)‎ . . (Updating TFD template: discussion was relisted (XFDcloser))
(cur | prev) 00:45, 6 June 2017‎ Plastikspork (talk | contribs)‎ . . (4,167 bytes) (0)‎ . . (Updating TFD template: discussion was relisted (XFDcloser))
(cur | prev) 10:48, 29 May 2017‎ Jc86035 (talk | contribs)‎ . . (4,167 bytes) (+222)‎ . . (Nominated for merging with Template:Country abbreviation; see Wikipedia:Templates for discussion/Log/2017 May 29#Template:ConvertAbbrev. (TW))
(cur | prev) 23:19, 12 November 2015‎ Callanecc (talk | contribs)‎ m . . (3,945 bytes) (0)‎ . . (Changed protection level of Template:ConvertAbbrev: Highly visible template: Around 45000 transclusions ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
(cur | prev) 15:32, 11 July 2011‎ Closedmouth (talk | contribs)‎ . . (3,945 bytes) (+1,542)‎ . . (per talk request)
(cur | prev) 16:28, 5 May 2011‎ Zzuuzz (talk | contribs)‎ m . . (2,403 bytes) (0)‎ . . (Protected Template:ConvertAbbrev: High risk template ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
(cur | prev) 21:37, 21 December 2010‎ Dudemanfellabra (talk | contribs)‎ m . . (2,403 bytes) (+109)‎ . . (add support for france)
(cur | prev) 05:22, 20 December 2010‎ Dudemanfellabra (talk | contribs)‎ . . (2,294 bytes) (+116)‎ . . (add support for ISO 3166-2:GB; hopefully make this work cleaner in a while)
(cur | prev) 15:30, 7 December 2010‎ Dudemanfellabra (talk | contribs)‎ m . . (2,178 bytes) (+19)‎ . . (add force parameter)
(cur | prev) 19:45, 5 December 2010‎ Dudemanfellabra (talk | contribs)‎ m . . (2,159 bytes) (+40)‎ . . (+Doc)
(cur | prev) 19:44, 5 December 2010‎ Dudemanfellabra (talk | contribs)‎ . . (2,119 bytes) (+1,983)‎ . . (install new code; no one objected on the talk page)
(cur | prev) 01:39, 10 August 2008‎ Dudemanfellabra (talk | contribs)‎ . . (136 bytes) (-266)‎ . . (try new method of passing parameters)
(cur | prev) 01:14, 10 August 2008‎ Dudemanfellabra (talk | contribs)‎ . . (402 bytes) (+337)‎ . . (Undid revision 230921063 by Dudemanfellabra (talk) heh.. doesn't work as planned)
(cur | prev) 01:11, 10 August 2008‎ Dudemanfellabra (talk | contribs)‎ . . (65 bytes) (-337)‎ . . (test theory that you don't need "optional" parameters in main template.. they'll be passed along later.)
(cur | prev) 01:04, 10 August 2008‎ Dudemanfellabra (talk | contribs)‎ . . (402 bytes) (-8)‎ . . (remove spaces to fix)
(cur | prev) 01:00, 10 August 2008‎ Dudemanfellabra (talk | contribs)‎ . . (410 bytes) (-64)‎ . . (remove ALL linebreaks to try to fix subtemplate coding)
(cur | prev) 00:55, 10 August 2008‎ Dudemanfellabra (talk | contribs)‎ . . (474 bytes) (-2)‎ . . (remove line break to fix subtemplate coding)
(cur | prev) 16:46, 9 August 2008‎ LeheckaG (talk | contribs)‎ . . (476 bytes) (+293)‎
(cur | prev) 15:19, 9 August 2008‎ LeheckaG (talk | contribs)‎ . . (183 bytes) (+2)‎
(cur | prev) 15:02, 9 August 2008‎ LeheckaG (talk | contribs)‎ . . (181 bytes) (+8)‎
(cur | prev) 12:26, 9 August 2008‎ LeheckaG (talk | contribs)‎ . . (173 bytes) (0)‎
(cur | prev) 12:25, 9 August 2008‎ LeheckaG (talk | contribs)‎ . . (173 bytes) (+107)‎
(cur | prev) 12:00, 9 August 2008‎ LeheckaG (talk | contribs)‎ . . (66 bytes) (-71)‎

(cur | prev) 11:56, 9 August 2008‎ LeheckaG (talk | contribs)‎ . . (137 bytes) (+137)‎ . . (← Created page with '{{ConvertAbbrev/{{{1}}}||||||||{
Unexpected use of template {{9}} - see Template:9 for details. }}
[edit] [purge] Template documentation
The below content is licensed according to Creative Commons Attribution-ShareAlike License contrary to the public domain logo at the foot of the page. It originally appeared on http://en.wikipedia.org. The original article might still be accessible here. You may be able to find a list of the article's previous contributors on the talk page.

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 "California", but the template you're trying to use will only recognize "CA", use this to convert it!

How to use the template

Syntax: {{ConvertAbbrev|datatype|specification|value|force=abbr or long}}

This template consists of a "tree" 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 "ISO 3166-1", that tells the template to look for a subtype (alpha2, alpha3, or numeric). If the datatype parameter is "ISO 3166-2", the template will look for a specific country (Canada, Mexico, United States, etc.). If the datatype parameter is "ISO 639-1", 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 abbreviation 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:

  • {{ConvertAbbrev|ISO 3166-1|alpha-2|__country__}} can also be called by
    • {{ConvertAbbrev|Countries|alpha-2|__country__}} or
    • {{ConvertAbbrev|Countries|__country__}}.
      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.
  • {{ConvertAbbrev|ISO 3166-2|CA|__province__}} can also be called by
  • {{ConvertAbbrev|ISO 639-1|__language__}} can also be called by
    • {{ConvertAbbrev|Languages|-1|__language__}} or
    • {{ConvertAbbrev|Languages|__language__}}.
      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.
  • {{ConvertAbbrev|ISO 639-2|__language__}} can also be called by

Supported datasets

File:ConvertAbbrev Progress.svg
Countries supported in ISO 3166-2:
     Supported
     Not yet supported
     Does not exist in ISO 3166-2

Usage Examples

From Name to Abbreviation
Code Returns
{{ConvertAbbrev|ISO 3166-1|alpha-2|United Kingdom}} GB
{{ConvertAbbrev|Countries|alpha-3|United States}} USA
{{ConvertAbbrev|ISO 3166-2|CA|Alberta}} 404 Error: Country not found. The country name or abbreviation you typed may be invalid. It is also possible that the {{ConvertAbbrev}} family simply does not yet support administrative divisions in this country. For a full list of supported ISO 3166-2 countries, click here.
{{ConvertAbbrev|Countries|Mexico|Federal District}} 404 Error: Country not found. The country name or abbreviation you typed may be invalid. It is also possible that the {{ConvertAbbrev}} family simply does not yet support administrative divisions in this country. For a full list of supported ISO 3166-2 countries, click here.
{{ConvertAbbrev|ISO 639-1|Russian}} ru
{{ConvertAbbrev|Languages|Chinese}} zh
From Abbreviation to Name
Code Returns
{{ConvertAbbrev|ISO 3166-1|alpha-2|GB}} United Kingdom
{{ConvertAbbrev|Countries|alpha-3|USA}} United States
{{ConvertAbbrev|ISO 3166-2|CA|AB}} 404 Error: Country not found. The country name or abbreviation you typed may be invalid. It is also possible that the {{ConvertAbbrev}} family simply does not yet support administrative divisions in this country. For a full list of supported ISO 3166-2 countries, click here.
{{ConvertAbbrev|Countries|Mexico|DF}} 404 Error: Country not found. The country name or abbreviation you typed may be invalid. It is also possible that the {{ConvertAbbrev}} family simply does not yet support administrative divisions in this country. For a full list of supported ISO 3166-2 countries, click here.
{{ConvertAbbrev|ISO 639-1|ru}} Russian
{{ConvertAbbrev|Languages|zh}} Chinese

Sub-pages

For a list of all the sub-pages of this template, see: Special:PrefixIndex/Template:ConvertAbbrev

')

LuisAnton (talkcontribs) 10:41, 28 July 2017 (UTC)