views:

747

answers:

7

Hi everyone,

Lately we've started getting issues with outdated countries / regions list being presented to users of our web-application.

We currently have a few DB tables to store localized country names along with their regions (states). However as the planet goes, that list is in constant evolution and it's proving to be a pain to maintain as some regions are deleted, some merged - existing data needs to be updated all the time.

What are, if any exist, the best practices when it come to dealing with multi-locale countries/regions list?

Is there a place or a standard in place? I know of ISO 3166, but their list isn't exactly DB friendly ... plus it's not fully localized.

An ideal solution would simply allow us to "sync" to it? Preferably in multiple language. The solution would preferably be free or subscription based with an historic of what changed so we could update our data (aka tblAddress)

Thanks!

+3  A: 

The ISO lists here are DB friendly, though they only include short names and codes.

JacobM
Thanks, that link allowed me to find this:http://www.iso.org/iso/publications_and_e-products/databases.htm#PUB100050which is an Access db you can order containing ISO 3166-1 (country) code and ISO 3166-2 (region) code.However it's not ideal as it's not automated (you have to buy each version) nor does it allow you to keep track of what changed to update existing data. Plus it's appears to only be available in english and french.Good find anyway +1
jfrobishow
+6  A: 

geonames is pretty accurate in this respect, and they update regularly.

http://www.geonames.org/export/

Jason
Nice - the most complete solution I have seen by far.
jfrobishow
+1  A: 

Well, wait, do you just want an up-to-date list of countries? Or do you need to know that Country X has split into Country Y and Country Z? Because I'm not aware of any automated way to get the latter. Even updates to the ISO databases are distributed as PDFs (you're on your own for implementing the change)

Eli
Well updates such as X as split into Y/Z would be the best - as it would allow update to existing data.How do you typically deal with "orphaned" address once a country disapear/merge? or more importantly a state, which seems to happen more often.
jfrobishow
+2  A: 

There is no such thing. This is a political issue, which you can only solve in the context of your own application. Deciding to use ISO 3166 could be the easiest to defend. I know of issues with at least:

  • China/Taiwan
  • Israel/Palestine
  • China/Tibet
  • Greece/Macedonia
Stephan Eggermont
Not sure why this gets negative scores.
Stephan Eggermont
Me not either: +1
Nikolai Ruhe
The list goes on: Germany/Bavaria
Nikolai Ruhe
Me neither; btw, Croatia/Slovenia
ldigas
Concerning the last two comments before this one: Bavaria is a state in Germany, no country by its own. Since 1991 Croatia and Slovenia are two independent countries. --- The original comment pointed to political issues concerning international acceptance of the mentioned nations in their own right, or territorial disputes, which is correct. Adding the last two entries to the above list would not be correct, as I would not know a single nation objecting the situation.
Kariem
Germany/Bavaria was a joke. Maybe only obvious for Germans. Or Bavarians.
Nikolai Ruhe
Nope, obvious also for the Dutch :)
Stephan Eggermont
All I know of Bavaria is that they brew good beer :) So does Germany though.
jfrobishow
I understood it as a joke too. But then I saw the comment about Croatia and Slovenia, so I just had to correct that - might have not been necessary, sorry.
Kariem
+1  A: 

This one looks very good: Multiple languages, update option, database independent file format for import, countries/regions/cities information, and some other features you might use or not.

And it's quite affordable if you need it for only one server.

MicSim
Agreed - I will look more into it. This is promising, sure their are political issues but at some point you have to call the country something...
jfrobishow
+1  A: 

The EU maintains data about Local Administrative Units (LAUs) which can be downloaded as hierarchical XLS files in several languages.

devio
+1  A: 

You can try CLDR

http://cldr.unicode.org/

This set of data is maintained by the Unicode organization. It is updated regularly and the data is versioned so it is easy for you to manage the state of your list.

Clint