我需要将邮政地址格式化为国家/地区的格式,并且正在寻找一些可以做到这一点的 PHP 库。我使用使用 Locale 的 zend 框架 2,但不幸的是,目前似乎无法处理这个问题。
examples
NL RECIPIENT
STREET_NAME HOUSE_NUMBER
POSTAL_CODE LOCALITY
COUNTRY
US RECIPIENT
HOUSE_NUMBER STREET_NAME [STREET_TYPE] [STREET_DIRECTION] [BUILDING] [FLOOR] [APARTMENT]
LOCALITY PROVINCE_ABBREVIATION POSTAL_CODE
COUNTRY
UK RECIPIENT
[FLOOR] [APARTMENT]
[BUILDING]
[HOUSE_NUMBER] STREET_NAME
[DEPENDENT_LOCALITY]
LOCALITY
POSTAL_CODE
(来源http://www.addressdoctor.com/en/countries-data/address-formats.html)