It would be nice to get support for Austrian provinces.

Patch attached. Credits for the original version go to tomrenner

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Component: Code » Address formats
Category: task » feature
a.milkovsky’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta5
Issue summary: View changes
FileSize
1.02 KB

Updated the patch using the official ISO 3166-2 codes.

a.milkovsky’s picture

FileSize
1.07 KB

Improved patch with the #render_option_value option.

bojanz’s picture

Status: Needs review » Needs work

Hm, Google's dataset (Android/Chrome) says that states aren't used for mailing in Austria, and the PDF at https://www.post.at/en/personal_send_letter_mail_shipping_advice_address... also has no mention of states.

Am I missing something?

bojanz’s picture

Status: Needs work » Closed (won't fix)

Reopen if you can provide an official source saying states are used for mailing.

fago’s picture

Status: Closed (won't fix) » Needs review

States aren't used for mailing in Austria, still there are plenty of use-cases where people want states in their addresses.

bojanz’s picture

Status: Needs review » Closed (won't fix)

They will need to write a custom module that provides a plugin which adds the states then (like https://www.drupal.org/project/addressfield_peru and others do).
The primary use case of this module is postal addresses, so I can't justify adding non-postal data.

fago’s picture

While it's not necessary nor common in mailings, it's often entered and stored information for postal addresses. If it's about postal addresses, I think it would be great to have support for it in particular as there is already an option. If it's about postal addresses for mailings, it shouldn't included by default though.

Thus, I agree it make sense to not include it but have it as an optional extension. It might make sense to clarify that the module provides / comes with sensible defaults for mailings?

bojanz’s picture

The Austrian post office says that no postal address has a state. Whether that address is on an envelope or a form is irrelevant.

You are free to create a contrib module that changes this logic, I'm just following the official recommendation, just like Google is (in Android/Chrome).