I am using the IP address to detect countries, and browser headers to detect language. But when it comes to having the user override these, it would be good interface design to:

  • let them select neigbouring countries on top of the list
  • let them select languages by clicking on spoken language lists on countries

In order to avoid very long or multiple step (continent, country) dropdowns.

I know you can find ISO lists of countries, currencies, currency symbols en notation, but has this all been put together in some kind of package with an API?


I can't say for a fact that this would work, but the WolframAlpha search engine has detailed information on countries, including a section on neighboring countries (see this example). And they have an API to their search service. I can't vouch for the API, but the search engine is extremely useful and accurate.


It really depends on the framework you're using to build your web app.

To take an example that I'm most familiar with, the Django (Python) system has pretty extensive locale support, including a Locale middleware package and the ability to localize Javascript components as well as a simple tool for user selection of locale. You can read all about it in the Django book. You can see a really elaborate use of i18n/l10n (internationalization/localization) in Django in the Pootle project, which provides

Another CMS, Drupal, has built-in support for language selection of the sort you're looking for.

And in the Java environment, the Spring MVC classes also provide support and examples of internationalization and user locale selection.

Not the answer you're looking for? Browse other questions tagged or ask your own question.