Question

http://www.iso.org/iso/country_names_and_code_elements has "VIRGIN ISLANDS, BRITISH". I would've thought the country is called "British Virgin Islands'. Am I looking at the wrong place for country names? And yes, this is a programming question, I want to use it in Drupal core.

Edit: and no, the question is not just that single country name. Every country name separated by comma seems to be a similar problem. I need an ISO source :/

Was it helpful?

Solution

ISO 3166 has no concept of "common name" for a country. It only carries the following names:

  • English (or French) short name
  • English (or French) full name

The short name will be something like:

Central African Republic (the)
Virgin Islands, British

The long name will be something like:

The Republic of Equatorial Guinea
People's Republic of China

Both the short and long names are somewhat useless in a user interface. That's why the Debian project maintains a 'common name' column in its ISO 3166 database. It fixes some of the blatant issues, but definitely not all of them (especially not the Virgin Islands, British entry).

OTHER TIPS

From Wikipedia:

"The official name of the British Virgin Islands is simply the Virgin Islands, and the official name of the United States Virgin Islands is the Virgin Islands of the United States."

Based on that, I would be tempted to drop the word British altogether and provide the US entry alongside whatever list you're putting it into. That way when locals scroll a-z to find "virgin islands" both entries are there, and also both entries are "correct" based on current naming conventions. Assuming Wikipedia is correct, of course.

Although I suspect locals would probably identify with being from the "Virgin Islands" first and British/American second, I have no cultural background on that region that would make me an expert on this particular issue, so if someone has a better answer I'd be happy to hear it.

You can get a country code to name map at http://country.io/names.json, and it has sensible names:

CF: "Central African Republic",
VG: "British Virgin Islands",
VI: "U.S. Virgin Islands",
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top