I need to format postal addresses into the format of the country and am looking for some PHP library that can do that. I work with zend framework 2 which uses Locale but unfortunately that does not seem to be able to handle this at this time.
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
(source http://www.addressdoctor.com/en/countries-data/address-formats.html)