Template:CanProvName/doc

This template converts the names of Canadian provinces to their two-letter codes or vice versa. This is useful because some templates ask for province names as input and others ask for province code, so one type of template could not be nested in the other without translation between the two formats.

Usage
Use the province name in the first parameter to get the code. Put  in the second parameter to get the full province name. For example:

The previous names of Newfoundland and Labrador and the Northwest Territories can be produced as follows:

TemplateData
{ "description": "This template converts between the full names and short form names of Canadian provinces.", "params": { "1": {     "label": "province", "description": "Full name or short form name of province.", "type": "line", "suggested": true, "required": true },   "2": {      "label": "type of output", "description": "By default, template will output the two-letter code for the province. Set this parameter to 'name' to output the full name. Set this parameter to 'link' to make the two-letter code a wikilink.", "type": "line", "suggested": false, "suggestedvalues": ["name", "link"], "required": false } } }