Difference between revisions of "Template:ConvertAbbrev/ISO 3166-2/GB"
imported>Dudemanfellabra (create for use with Template:ConvertAbbrev) |
imported>Dudemanfellabra (implement case insensitivity) |
||
| Line 1: | Line 1: | ||
{{#ifeq:{{{force|}}}|abbr|| | {{#ifeq:{{{force|}}}|abbr|| | ||
| − | {{#switch: {{{1}}} | + | {{#switch: {{uc:{{{1}}}}} |
<!-- | <!-- | ||
| Line 311: | Line 311: | ||
| {{#ifeq:{{{force|}}}|long|{{{1}}}}} | | {{#ifeq:{{{force|}}}|long|{{{1}}}}} | ||
}}}}{{#ifeq:{{{force|}}}|long|| | }}}}{{#ifeq:{{{force|}}}|long|| | ||
| − | {{#switch: {{{1}}} | + | {{#switch: {{lc:{{{1}}}}} |
<!-- | <!-- | ||
| Line 317: | Line 317: | ||
--> | --> | ||
| − | | | + | |england=ENG |
| − | | | + | |northern ireland=NIR |
| − | | | + | |scotland=SCT |
| − | | | + | |wales=WLS |
| − | | | + | |england and wales=EAW |
| − | | | + | |great britain=GBN |
| − | | | + | |united kingdom=UKM |
<!-- | <!-- | ||
| Line 333: | Line 333: | ||
--> | --> | ||
| − | | | + | |buckinghamshire=BKM |
| − | | | + | |cambridgeshire=CAM |
| − | | | + | |cumbria=CMA |
| − | | | + | |derbyshire=DBY |
| − | | | + | |devon=DEV |
| − | | | + | |dorset=DOR |
| − | | | + | |east sussex=ESX |
| − | | | + | |essex=ESS |
| − | | | + | |gloucestershire=GLS |
| − | | | + | |hampshire=HAM |
| − | | | + | |hertfordshire=HRT |
| − | | | + | |kent=KEN |
| − | | | + | |lancashire=LAN |
| − | | | + | |leicestershire=LEC |
| − | | | + | |lincolnshire=LIN |
| − | | | + | |norfolk=NFK |
| − | | | + | |north yorkshire=NYK |
| − | | | + | |northamptonshire=NTH |
| − | | | + | |nottinghamshire=NTT |
| − | | | + | |oxfordshire=OXF |
| − | | | + | |somerset=SOM |
| − | | | + | |staffordshire=STS |
| − | | | + | |suffolk=SFK |
| − | | | + | |surrey=SRY |
| − | | | + | |warwickshire=WAR |
| − | | | + | |west sussex=WSX |
| − | | | + | |worcestershire=WOR |
<!-- | <!-- | ||
| Line 365: | Line 365: | ||
--> | --> | ||
| − | | | + | |city of london|london=LND |
<!-- | <!-- | ||
| Line 371: | Line 371: | ||
--> | --> | ||
| − | | | + | |barking and dagenham=BDG |
| − | | | + | |barnet=BNE |
| − | | | + | |bexley=BEX |
| − | | | + | |brent=BEN |
| − | | | + | |bromley=BRY |
| − | | | + | |camden=CMD |
| − | | | + | |croydon=CRY |
| − | | | + | |ealing=EAL |
| − | | | + | |enfield=ENF |
| − | | | + | |greenwich=GRE |
| − | | | + | |hackney=HCK |
| − | | | + | |hammersmith and fulham=HMF |
| − | | | + | |haringey=HRY |
| − | | | + | |harrow=HRW |
| − | | | + | |havering=HAV |
| − | | | + | |hillingdon=HIL |
| − | | | + | |hounslow=HNS |
| − | | | + | |islington=ISL |
| − | | | + | |kensington and chelsea=KEC |
| − | | | + | |kingston upon thames=KTT |
| − | | | + | |lambeth=LBH |
| − | | | + | |lewisham=LEW |
| − | | | + | |merton=MRT |
| − | | | + | |newham=NWM |
| − | | | + | |redbridge=RDB |
| − | | | + | |richmond upon thames=RIC |
| − | | | + | |southwark=SWK |
| − | | | + | |sutton=STN |
| − | | | + | |tower hamlets=TWH |
| − | | | + | |waltham forest=WFT |
| − | | | + | |wandsworth=WND |
| − | | | + | |westminster=WSM |
<!-- | <!-- | ||
| Line 408: | Line 408: | ||
--> | --> | ||
| − | | | + | |barnsley=BNS |
| − | | | + | |birmingham=BIR |
| − | | | + | |bolton=BOL |
| − | | | + | |bradford=BRD |
| − | | | + | |bury=BUR |
| − | | | + | |calderdale=CLD |
| − | | | + | |coventry=COV |
| − | | | + | |doncaster=DNC |
| − | | | + | |dudley=DUD |
| − | | | + | |gateshead=GAT |
| − | | | + | |kirklees=KIR |
| − | | | + | |knowsley=KWL |
| − | | | + | |leeds=LDS |
| − | | | + | |liverpool=LIV |
| − | | | + | |manchester=MAN |
| − | | | + | |newcastle upon tyne=NET |
| − | | | + | |north tyneside=NTY |
| − | | | + | |oldham=OLD |
| − | | | + | |rochdale=RCH |
| − | | | + | |rotherham=ROT |
| − | | | + | |saint helens|st. helens|st helens=SHN |
| − | | | + | |salford=SLF |
| − | | | + | |sandwell=SAW |
| − | | | + | |sefton=SFT |
| − | | | + | |sheffield=SHF |
| − | | | + | |solihull=SOL |
| − | | | + | |south tyneside=STY |
| − | | | + | |stockport=SKP |
| − | | | + | |sunderland=SND |
| − | | | + | |tameside=TAM |
| − | | | + | |trafford=TRF |
| − | | | + | |wakefield=WKF |
| − | | | + | |walsall=WLL |
| − | | | + | |wigan=WGN |
| − | | | + | |wirral=WRL |
| − | | | + | |wolverhampton=WLV |
<!-- | <!-- | ||
| Line 449: | Line 449: | ||
--> | --> | ||
| − | | | + | |bath and north east somerset=BAS |
| − | | | + | |blackburn with darwen=BBD |
| − | | | + | |bedford=BDF |
| − | | | + | |blackpool=BPL |
| − | | | + | |bournemouth=BMH |
| − | | | + | |bracknell forest=BRC |
| − | | | + | |brighton and hove=BNH |
| − | | | + | |city of bristol|bristol=BST |
| − | | | + | |central bedfordshire=CBF |
| − | | | + | |cheshire east=CHE |
| − | | | + | |cheshire west and chester=CHW |
| − | | | + | |cornwall=CON |
| − | | | + | |darlington=DAL |
| − | | | + | |derby=DER |
| − | | | + | |durham=DUR |
| − | | | + | |east riding of yorkshire=ERY |
| − | | | + | |halton=HAL |
| − | | | + | |hartlepool=HRL |
| − | | | + | |herefordshire=HEF |
| − | | | + | |isle of wight=IOW |
| − | | | + | |kingston upon hull=KHL |
| − | | | + | |leicester=LCE |
| − | | | + | |luton=LUT |
| − | | | + | |medway=MDW |
| − | | | + | |middlesbrough=MDB |
| − | | | + | |milton keynes=MIK |
| − | | | + | |north east lincolnshire=NEL |
| − | | | + | |north lincolnshire=NLN |
| − | | | + | |north somerset=NSM |
| − | | | + | |northumberland=NBL |
| − | | | + | |nottingham=NGM |
| − | | | + | |peterborough=PTE |
| − | | | + | |plymouth=PLY |
| − | | | + | |poole=POL |
| − | | | + | |portsmouth=POR |
| − | | | + | |reading=RDG |
| − | | | + | |redcar and cleveland=RCC |
| − | | | + | |rutland=RUT |
| − | | | + | |shropshire=SHR |
| − | | | + | |slough=SLG |
| − | | | + | |south gloucestershire=SGC |
| − | | | + | |southampton=STH |
| − | | | + | |southend-on-sea|southend on sea=SOS |
| − | | | + | |stockton-on-tees|stockton on tees=STT |
| − | | | + | |stoke-on-trent|stoke on trent=STE |
| − | | | + | |swindon=SWD |
| − | | | + | |telford and wrekin=TFW |
| − | | | + | |thurrock=THR |
| − | | | + | |torbay=TOB |
| − | | | + | |warrington=WRT |
| − | | | + | |west berkshire=WBK |
| − | | | + | |wiltshire=WIL |
| − | | | + | |windsor and maidenhead=WNM |
| − | | | + | |wokingham=WOK |
| − | | | + | |york=YOR |
<!-- | <!-- | ||
| Line 509: | Line 509: | ||
--> | --> | ||
| − | | | + | |antrim=ANT |
| − | | | + | |ards=ARD |
| − | | | + | |armagh=ARM |
| − | | | + | |ballymena=BLA |
| − | | | + | |ballymoney=BLY |
| − | | | + | |banbridge=BNB |
| − | | | + | |belfast=BFS |
| − | | | + | |carrickfergus=CKF |
| − | | | + | |castlereagh=CSR |
| − | | | + | |coleraine=CLR |
| − | | | + | |cookstown=CKT |
| − | | | + | |craigavon=CGV |
| − | | | + | |derry=DRY |
| − | | | + | |down=DOW |
| − | | | + | |dungannon=DGN |
| − | | | + | |fermanagh=FER |
| − | | | + | |larne=LRN |
| − | | | + | |limavady=LMV |
| − | | | + | |lisburn=LSB |
| − | | | + | |magherafelt=MFT |
| − | | | + | |moyle=MYL |
| − | | | + | |newry and mourne district|newry and mourne=NYM |
| − | | | + | |newtownabbey=NTA |
| − | | | + | |north down=NDN |
| − | | | + | |omagh=OMH |
| − | | | + | |strabane=STB |
<!-- | <!-- | ||
| Line 540: | Line 540: | ||
--> | --> | ||
| − | | | + | |aberdeen city|aberdeen=ABE |
| − | | | + | |aberdeenshire=ABD |
| − | | | + | |angus=ANS |
| − | | | + | |argyll and bute=AGB |
| − | | | + | |clackmannanshire=CLK |
| − | | | + | |dumfries and galloway=DGY |
| − | | | + | |dundee City|dundee=DND |
| − | | | + | |east ayrshire=EAY |
| − | | | + | |east dunbartonshire=EDU |
| − | | | + | |east lothian=ELN |
| − | | | + | |east renfrewshire=ERW |
| − | | | + | |city of edinburgh|edinburgh=EDH |
| − | | | + | |eilean siar=ELS |
| − | | | + | |falkirk=FAL |
| − | | | + | |fife=FIF |
| − | | | + | |glasgow city|glasgow=GLG |
| − | | | + | |highland=HLD |
| − | | | + | |inverclyde=IVC |
| − | | | + | |midlothian=MLN |
| − | | | + | |moray=MRY |
| − | | | + | |north ayrshire=NAY |
| − | | | + | |north lanarkshire=NLK |
| − | | | + | |orkney islands=ORK |
| − | | | + | |perth and kinross=PKN |
| − | | | + | |renfrewshire=RFW |
| − | | | + | |the scottish borders|scottish borders=SCB |
| − | | | + | |shetland islands=ZET |
| − | | | + | |south ayrshire=SAY |
| − | | | + | |south lanarkshire=SLK |
| − | | | + | |stirling=STG |
| − | | | + | |west dunbartonshire=WDU |
| − | | | + | |west lothian=WLN |
<!-- | <!-- | ||
| Line 577: | Line 577: | ||
--> | --> | ||
| − | | | + | |blaenau gwent=BGW |
| − | | | + | |bridgend=BGE |
| − | | | + | |caerphilly=CAY |
| − | | | + | |cardiff=CRF |
| − | | | + | |carmarthenshire=CMN |
| − | | | + | |ceredigion|sir ceredigion=CGN |
| − | | | + | |conwy=CWY |
| − | | | + | |denbighshire=DEN |
| − | | | + | |flintshire=FLN |
| − | | | + | |gwynedd=GWN |
| − | | | + | |isle of anglesey=AGY |
| − | | | + | |merthyr tydfil=MTY |
| − | | | + | |monmouthshire=MON |
| − | | | + | |neath port talbot=NTL |
| − | | | + | |newport=NWP |
| − | | | + | |pembrokeshire=PEM |
| − | | | + | |powys=POW |
| − | | | + | |rhondda, cynon, taff|rhondda, cynon, taf=RCT |
| − | | | + | |swansea=SWA |
| − | | | + | |torfaen|tor-faen=TOF |
| − | | | + | |the vale of glamorgan=VGL |
| − | | | + | |wrexham=WRX |
<!-- | <!-- | ||
| Line 604: | Line 604: | ||
--> | --> | ||
| − | | | + | |cymru=CYM |
| − | | | + | |pen-y-bont ar ogwr=POG |
| − | | | + | |caerffili=CAF |
| − | | | + | |caerdydd=CRD |
| − | | | + | |sir gaerfyrddin=GFY |
| − | | | + | |sir ddinbych=DDB |
| − | | | + | |sir y fflint=FFL |
| − | | | + | |sir ynys môn|sir ynys mon=YNM |
| − | | | + | |merthyr tudful=MTU |
| − | | | + | |sir fynwy=FYN |
| − | | | + | |castell-nedd port talbot=CTL |
| − | | | + | |casnewydd=CNW |
| − | | | + | |sir benfro=BNF |
| − | | | + | |abertawe=ATA |
| − | | | + | |bro morgannwg=BMG |
| − | | | + | |wrecsam=WRC |
| {{#ifeq:{{{force|}}}|abbr|{{uc:{{{1}}}}}}} | | {{#ifeq:{{{force|}}}|abbr|{{uc:{{{1}}}}}}} | ||
}}}}<noinclude>{{Documentation|Template:ConvertAbbrev/doc}}</noinclude> | }}}}<noinclude>{{Documentation|Template:ConvertAbbrev/doc}}</noinclude> | ||
Latest revision as of 16:14, 27 August 2011
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|Countries|CA|__province__}},{{ConvertAbbrev|Countries|Canada|__province__}},{{ConvertAbbrev|Canada|__province__}}, or{{ConvertAbbrev|CN|__province__}}.
{{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{{ConvertAbbrev|Languages|-2|__language__}}.
Supported datasets
- ISO 3166-1 – Country abbreviations
- ISO 3166-2 – State/provincial abbreviations
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 ["FR-75" in ISO 3166-2:FR], you should only type "75" and not "FR-75".)- 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 codes
Usage Examples
|
|
Sub-pages
For a list of all the sub-pages of this template, see: Special:PrefixIndex/Template:ConvertAbbrev
| The above documentation is transcluded from Template:ConvertAbbrev/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |