Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 TemplateData  














Template:CanProvName







Add links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


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 name in the second parameter to get the full province name. For example:

Input Output Output with |name Output with |link
{{CanProvName|Saskatchewan}} SK Saskatchewan SK
{{CanProvName|P.E.I.}} PE Prince Edward Island PE
{{CanProvName|Northwest Territories}} NT Northwest Territories NT
{{CanProvName|Canada}} CA Canada CA
{{CanProvName|QC}} QC Quebec QC

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

Input Output Output with |name Output with |link
{{CanProvName|NF}} NF Newfoundland NF
{{CanProvName|N-W}} NT North-West Territories NT

TemplateData

This template converts between the full names and short form names of Canadian provinces.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
province1

Full name or short form name of province.

Linerequired
type of output2

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.

Suggested values
name link
Lineoptional

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:CanProvName&oldid=1186198847"

Category: 
Canada subdivision templates
Hidden category: 
Wikipedia template-protected templates
 



This page was last edited on 21 November 2023, at 15:27 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki