Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Attached is a patch to populate Egypt states (governorates) select list.
I wish I could provide a standard keys (i.e. 'ALX' => 'Alexandria'
instead of 'Alexandria' => 'Alexandria'
, but unfortunately Google Geocoder (by means of D7 Geocode module) does not understand ISO codes.
Comment | File | Size | Author |
---|---|---|---|
egypt-divisions.patch | 2.56 KB | Remon |
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedComment #2
rszrama CreditAttribution: rszrama commentedCan you help me understand why geocoding wouldn't work with the ISO 3166-2 code? In pretty much any instance, we prefer to use ISO codes for abbreviated country / administrative area names. It would be better to find out why another module / service isn't working and use a compatibility layer than it would be to have some administrative areas use the ISO codes and others the full names.
For example, it could be that when rendering an Egyptian address for geocoding we simply determine the full name instead of just passing in the code while still using the code for data storage.
Comment #3
bojanz CreditAttribution: bojanz commentedYeah, ISO codes need to be used here.
Here's Google's list: https://github.com/commerceguys/addressing/blob/master/resources/subdivi... in case anyone wants to look at it while rerolling the patch.
Comment #5
bojanz CreditAttribution: bojanz commentedCommitted: http://cgit.drupalcode.org/addressfield/diff/?id=17975c8
UPU has no official list: http://www.upu.int/fileadmin/documentsFiles/activities/addressingUnit/eg..., this one was created based on Google's dataset and Wikipedia, open a new issue for any corrections.