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.

CommentFileSizeAuthor
egypt-divisions.patch2.56 KBRemon
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rszrama’s picture

Component: Code » Address formats
rszrama’s picture

Status: Needs review » Postponed (maintainer needs more info)

Can 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.

bojanz’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Needs work

Yeah, 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.

  • bojanz committed 17975c8 on 7.x-1.x
    Issue #1304140 by bojanz, Remon: Egypt administrative divisions
    
bojanz’s picture

Status: Needs work » Fixed

Committed: 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.