There are examples online with web select boxes that have a huge list of countries and that probably will be good enough for me to use. However, by Murphy's law, there's bound to be some random country that someone is from and isn't on my list (and probably someone else also ran into this and has updated their local list). Also, when new countries are added, I won't know about it.
Basically, I feel it's better practice and a better smell if there is some centralized list of country names that I can use / trust. (also it could set/follow standards for exact namings "United St..." vs "USA" etc.)
I would prefer a solution that isn't IIS specific if possible
There are many list of countries, check this wikipedia article; there you can find some lists like:
And more...
We maintain a list of 'PUBLIC DOMAIN' Worldwide Country names in all official formats. The information comes from the ISO 3166-1 Maintenance Agency for offical English and French short names, the US Board on Geographic Names (BGN) for english short, long and local short, long names, and United Nations Group of Experts on Geographic Names (UNGEGN) format (long) English, French names, short and formal local names and Spanish names.
There still is a problem representing some Arabic characters as romanized characters (will see ?). But these are limited to the local names of a few Arab countries.
Note, the English, Spanish and French cover the 3 Western languages of the UN's official 6 languages. Metadata, information on the sources, and download can be found at:
http://www.opengeocode.org/download.php#countrynames
The Open Geocode Team OpenGeoCode.org
Jan. 26, 2014. We updated the list to include country names in Italian and German. We used the UN Food & Agriculture list of countries in Italian and the German Government's Federal Foreign Office's list of countries in German.
I recommend pulling data out of the Unicode CLDR (Common Locale Data Repository), which include a professionally-maintained list of countries and country name data.
Grab the data from there once, and do updates once in a while; the CLDR data will come in a consistent format, so you won't need to fuss over it once it's part of your workflow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With