commerceguys / addressing

A PHP addressing library, powered by CLDR and Google's address data.
MIT License
922 stars 135 forks source link

Formatted US addresses do not adhere to USPS recommendations. Is that on purpose? #141

Closed mehov closed 4 years ago

mehov commented 4 years ago

Hello and thank you for your work!

I tried the Formatters example, but made it slightly more complex by using the full words, e.g. avenue instead of ave. and suite instead of ste. and all in one line.

I then did echo($formatter->format($address)) and here's what I have noticed:

I made sure withCountryCode('US') is present.

I read the backstory where you said the US-centric forms are annoying (and I agree, actually), so I'm wondering if you ignored these intentionally?

bojanz commented 4 years ago

This whole library is built around Google's address formats, used by Chrome and Android (and by now, various eCommerce software, from OroCommerce to Drupal Commerce). You can discuss the US address format in https://github.com/google/libaddressinput/issues

Neither Google nor we adjust the address for any specific shipping provider, that would be the job of code that interacts with that service. All ecommerce sites and solutions I've interacted with have had an address line 2, so if there's a trend to remove it, it's a new one. In fact, we've had pretty persistent requests to introduce an address line 3, for some south american countries.

bojanz commented 4 years ago

No further response given, closing.