Closed (duplicate)
Project:
Address Field
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Oct 2011 at 16:26 UTC
Updated:
2 May 2013 at 03:54 UTC
This description is basically a outline of a conversation with Damien on how the address widget should be built in order to support all the countries by default using defaults based in ISO codes.
Those codes could be for example the debian xml file that could be included in the module:
http://anonscm.debian.org/gitweb/?p=iso-codes/iso-codes.git;a=blob;f=iso...
For each country, we need a property to select which list of provinces is used.
And of course we need to remove the list of provinces "harcoded" in address.inc.
Comments
Comment #1
patrick.thurmond@gmail.comI see no reason why we can't use a php function to go get and parse the XML on install and then insert the countries and their data into a table that we then use to populate the tables. I think using "simplexml_load_file()" will do nicely for this. I would go as far as just having the server download the latest copy of the file and if that fails to then fallback to an XML file that comes with the module.
Maybe even use multiple sources for this. Google probably has it hosted somewhere as well. Does anyone know if this file url is one that will get updated? If it does then I think the pull from web and fallback to local will allow for the latest information.
Comment #2
patrick.thurmond@gmail.comHere is something to consider. Maybe tying in with the Countries module.
Check out this issue: http://drupal.org/node/1142410
That guy has already gone a long way to tackling the whole shebang. Maybe the Address Field module can piggyback on that work.
Comment #3
Robin Millette commentedSee #1441514: Support Countries module for populating the country drop-down menu.
Comment #4
quicksketchThough the end result was moving the code into a separate sandbox instead of being part of the main project. I don't know, this is getting to be quite the list of dependencies. Now requiring Entity API, Countries, and Countries Regions (plus Address Field of course). I like this XML file approach, but I can't see how it would actually help our problem entirely, since as we've seen the order and labels of things like States/Provinces, Zip/Postal, etc. changes both names and position depending on country. None of these XML files seem to help with this problem.
Comment #5
jeff veit commentedISO 3166 isn't free or Free. Ish.
Just potential problem to highlight. The country codes are ISO 3166. ISO says that they 'make(s) the list of alpha-2 country codes available for internal use and non-commercial purposes free of charge'. Elsewhere on http://www.iso.org/iso/country_codes.htm it says that they are free.
I'm not sure what licence they attach to the dataset or if they have ever gone after anyone for using the data.
I would not be surprised if this has come up before - so there may be some policy level resolution already hammered out.
Comment #6
j0rd commentedThis is a duplicate of
#1829900: [meta] Address Field 2.x needs pluggable administrative areas and an actual API
If you think so to, please close your ticket.
Comment #7
rszrama commentedI think j0rd is right here; the goal of this issue is the same as the one he's linked, but his is a more abstracted solution to not just this particular problem but others as well.