Template:Postal: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!-- This should probably become a Lua module at some point, the #if chaining is going to get cumbersome if too many more patterns are added --><noinclude>
<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.


Line 6: Line 6:
<pre>{{postal|Wisconsin}}
<pre>{{postal|Wisconsin}}
{{postal|Arizona}}
{{postal|Arizona}}
{{postal|Quebec}}</pre>
{{postal|Quebec}}
{{postal|Bookland}}</pre>
{{postal|Wisconsin}}
{{postal|Wisconsin}}
{{postal|Arizona}}
{{postal|Arizona}}
{{postal|Quebec}}
{{postal|Quebec}}
{{postal|Bookland}}


== TemplateData ==
== TemplateData ==

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.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
State/province1

The state or province

Stringrequired