แม่แบบ:CanProvName
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 |
---|---|
{{CanProvName|Saskatchewan}}
|
SK |
{{CanProvName|N.W.T.}}
|
NT |
{{CanProvName|Northwest Territories}}
|
NT |
{{CanProvName|Canada}}
|
CA |
{{CanProvName|QC|name}}
|
Quebec |
{{CanProvName|NB|name}}
|
New Brunswick |
{{CanProvName|P.E.I.|name}}
|
Prince Edward Island |
See also[แก้]
คู่มือการใช้งานที่ปรากฏด้านบนนี้ดึงมาจาก แม่แบบ:CanProvName/doc (แก้ | ประวัติ) ผู้เขียนสามารถทำการทดลองได้ที่กระบะทราย (สร้าง | คัดลอก) และชุดทดสอบ (สร้าง) ของแม่แบบนี้ โปรดเพิ่มหมวดหมู่ไปที่หน้าย่อย /doc หน้าย่อยของแม่แบบนี้ |