Template:Postal: Difference between revisions
Robertbaxter (talk | contribs) m (Robertbaxter moved page Template:Postal abbreviation to Template:Postal without leaving a redirect) |
Robertbaxter (talk | contribs) No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | |||
This template replaces a state or province with the equivalent 2-letter postal code. | This template replaces a state or province with the equivalent 2-letter postal code. | ||
== Usage == | == Usage == | ||
The state or province should be passed as the only parameter of template. If the provided text is not recognized in the list on this page, the original text is displayed. | The state or province should be passed as the only parameter of template. If the provided text is not recognized in the list on this page, the original text is displayed. | ||
<pre>{{postal|Wisconsin}}</pre> | <pre>{{postal|Wisconsin}} | ||
{{postal|Arizona}} | |||
{{postal|Quebec}} | |||
{{postal|Bookland}}</pre> | |||
{{postal|Wisconsin}} | {{postal|Wisconsin}} | ||
{{postal|Arizona}} | |||
{{postal|Quebec}} | |||
{{postal|Bookland}} | |||
== TemplateData == | == TemplateData == | ||
Line 21: | Line 27: | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude><includeonly> | </noinclude><includeonly><!-- | ||
{{#switch: {{{1}}} | -->{{#switch: {{{1}}} | ||
| Alabama = AL | | Alabama = AL | ||
| Alaska = AK | | Alaska = AK | ||
Line 96: | Line 102: | ||
| Yukon = YT | | Yukon = YT | ||
| {{{1}}} | | {{{1}}} | ||
}} | }}<!-- | ||
--></includeonly> |
Latest revision as of 16:17, 3 September 2025
This template replaces a state or province with the equivalent 2-letter postal code.
Usage
The state or province should be passed as the only parameter of template. If the provided text is not recognized in the list on this page, the original text is displayed.
{{postal|Wisconsin}} {{postal|Arizona}} {{postal|Quebec}} {{postal|Bookland}}
WI AZ QC Bookland
TemplateData
A postal abbreviation transform.
Parameter | Description | Type | Status | |
---|---|---|---|---|
State/province | 1 | The state or province | String | required |