Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6371481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:04:38+00:00 2026-05-25T01:04:38+00:00

I am trying to provide drop down menus so that users can select their

  • 0

I am trying to provide drop down menus so that users can select their country and state in a multilingual web application.

I was able to extract a list of countries and the name of those countries in various languages from unicode.org’s cldr files.

Currently these are all stored in arrays in seperate files (I have files such as en.php, es.php, fr.php and so on).

While this doesn’t seem too difficult, I am having trouble trying to get a list of Administrative Divions (states/provinces/prefectures) in localized form. Essentially, if the person is using the french version (fr_fr) of the application, I would like that when he selects “France” as his country, the states drop down would be populated with the various french departments in french.

I have found some data on geonames.org: http://www.geonames.org/GB/administrative-division-united-kingdom.html but all the content seems to be in English, so I can’t provide localized states. Additionally, some countries like the UK have 2 sets of data in “Administrative division”, which might make grabbing the data automatically somewhat problematic.

Similiar, if someone is using the Japanese version, then the prefecture drop down should contain the prefectures in Japanese. As for the other countries, I think it would be unfeasible to have all administrative divisions translated into Japanese, so defaulting to English is fine.

Additionally, countries have different terms for administrative divisions (states/territory/provinces/prefectures and perhaps some other ones I have missed. I would like to have this data somewhere, so that when someone selets say, Japan, instead of the label being “state” he is presented with the label “prefecture”.

Another issue I have is where to store all the data. At the moment I am leaning towards storing the administrative division (state) and label (state,prefecture, etc) in arrays in a more specific file containing the locale (en_US.php, en_GB.php, etc).

Has anyone dealt with something like this on a project? I would love to hear your suggestions/views. Also, it would be great if someone can provide a source where I can get localized states.

EDIT

  • Post codes: Some countries don’t have post codes, so I need to store this information and make sure the postcode isn’t required when submitting.
  • Optional states: As mentioned. Some countries don’t have states, so this will need to be stored somehow.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T01:04:39+00:00Added an answer on May 25, 2026 at 1:04 am

    What are you using the state/province data for? If it is for mailing, then keep in mind that state/province is not required (and is not typically given) in the mailing addresses of many countries, and you will just annoy the user if you ask for it when it is not needed.

    Postal code is more important for mailing and the Unicode CLDR has the postal code validation regex for 158 countries. (It is in supplemental/postalCodeData.xml when you download the CLDR)

    If you really want state/province, then there is a CLDR proposal to add address formatting information to the CLDR here – http://unicode.org/review/pri180/

    You’ll notice that the proposal links to a google appengine service which contains the proposed address formatting information – http://i18napis.appspot.com/address

    The states/provinces seem to be listed there, but only for countries which require such information in postal addresses. And it looks like it is translated into the languages of each country – for example, Canadian province names are listed in both English and french. It also tells you, for example, that it is called a prefecture in Japan

    If you really, really want all subdivisions, regardless of whether it is needed in a postal address, then grab ISO 3166-2. Buy it here – http://www.iso.org/iso/country_codes/iso_3166_databases.htm (you can also potentially scape it off of the wikipedia site for ISO-3166-2)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i m trying to create a drop down list that takes values on the
I'm trying to write a plugin system to provide some extensibility to an application
I'm trying to create a generic class in PHP that will provide a way
I am trying to test a WPF application using the UI-Automation framework that MSFT
I am trying to create a user control within a WPF application that will
I have a set of drop down controls on a view that are linked
I am trying to get the drop down list of combobox by using a
I'm trying to create a drag and drop region that accepts any file type
I am trying to write some front end Javascript tests that can test drag
I am writing an Android application that interfaces with a RESTful service. This web

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.