country-codes

Is there an open source java enum of ISO 3166-1 country codes

Does anyone know of a freely available java 1.5 package that provides a list of ISO 3166-1 country codes as a enum or EnumMap? Specifically I need the "ISO 3166-1-alpha-2 code elements", i.e. the 2 character country code like "us", "uk", "de", etc. Creating one is simple enough (although tedious), but if there's a standard one already ...

Convert ALPHA-2 to ALPHA-3 in C# ASP.net

Is there a quick built in way to convert ALPHA-2 (GB) to ALPHA-3 (GBR) in C# without having to create an array of them all. ...

Source of data for "official" country/region list

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...

TimeZoneInfo and country codes

I'm looking to implement a function with a signature something like the following: bool IsTimeZoneValid(string countryCode, DateTime localTime); The intention is to determine whether the country has a time zone in which the local time would be valid, given that we know the current UTC time. Let's say, for the sake of argument, that "v...

Country codes list - C#

Hi all, I have a string which I need to verify if it's a Country code. The culture is German. Is there any method that I can call to get a list of Country codes in a German culture without having to type out all the 274 (?) codes myself? Thanks, Teja. ...

I have a list of country codes and a list of language codes. How do I map from country code to language code?

When the user visits the site, I can get their country code. I want to use this to set the default language (which they can later modify if necessary, just a general guess as to what language they might speak based on what country they are in). Is there a definitive mapping from country codes to language codes that exists somewhere? ...

How do you detect a website visitor's country (Specifically, US or not)?

I need to show different links for US and non-US visitors to my site. This is for convenience only, so I am not looking for a super-high degree of accuracy, and security or spoofing are not a concern. I know there are geotargeting services and lists, but this seems like overkill since I only need to determine (roughly) if the person is...

Where can I get up to date country list?

I need to get list of valid countries for web application, is there any list that could be downloaded as XML or similar format, so that I could atomatically update country list? ...

C# How can I get a list of country codes?

I need to know how can I get the list of country codes for mobile purposes, for eg, I am living in Singapore and my country code is (65). If I want to send a sms or call a number, I will specify +65 98287222. Edited: Is there any codes available to populate this list of country calling codes? I am using C#, windows application. Help ...

free sql script to get a list of countries, provinces/states and their cities.

I am working on a registration page for a php website as mysql as the backend database. I need a sql script to insert the list of countries with their associated provinces and the provinces with their associated cities. I need all the countries, provinces and cities all over the world which are related to each other. I can get the indi...

List of phone number country codes

On this Wikipedia entry I found out that ITU Telecommunication Standardization Sector (ITU-T) is providing such list of country calling codes. Here is a pdf: http://www.itu.int/dms_pub/itu-t/opb/sp/T-SP-E.164D-2009-PDF-E.pdf I wonder where to find this in a xml file or similar? I need to do find out which country a phone number is fro...

How to get Mobile Country and Network code on an iPhone

Is there any way of getting the mnc and mcc numbers on an iPhone? ...

Match language code with countries where this language is an official or commonly used language

Is there any python library to get a list of countries for a specific language code where it is an official or commonly used language? For example, language code of "fr" is associated with 29 countries where French is an official language plus 8 countries where it's commonly used. ...

Converting "fr_FR" into "French (France)" in both directions. (Objective-C iPhone)

I can easily change a short region-code (en_US) into a longer string... but it there an easy way to also move in the other direction? [displayInEnglish displayNameForKey:NSLocaleIdentifier value:regionCountryCode]; "en_US" becomes "English (United States)". "English (United States)" becomes "en_US". I currently store the short regio...

How to get the list of country names in a language (english for instance)?

Using Java, you can get the list of ISO2 codes through Locale.getISOCountries() (see this related question http://stackoverflow.com/questions/712231/best-way-to-get-a-list-of-countries-in-java). However, I would like to have the list of all country names (in English for example) and not the list of ISO2 country codes. How can I do that ...

What country codes are these?

Hi, i have some existing code, and i wonder what kind of country codes they are? Are the somehow mappable to codes somewhere in the .NET framework? <option value="4">Albania</option> <option value="7">Andorra</option> <option value="21">Anguilla</option> <option value="1">Antigua And Barbuda</option> ...

API/Service to retrieve Country of Issue for credit cards.

Hi everyone, can you point me to an API or online service that can return the country of issue (i.e. where the credit card has been issued) starting from the credit card number? I am not looking for a "free" solution, this will be a corporate app so it's ok if this is offered by some broker company like Bibit or Easycash for a fee - bu...

Convert country codes

There are several methods on country codes. I have a list of codes with 3-characters, like on this page: http://www.fina.org/H2O/index.php?option=com_content&amp;view=category&amp;id=93:asia&amp;Itemid=638&amp;layout=default Is there a simple way to convert them to 2-characters? Like "PT" from "POR" for Portugal. Standard for 2-chara...

Java code to convert country codes alpha-2 (IN) to alpha 3 (IND)

Using Java, Is there a quick way to convert an alpha-2 country code (IN or GB) to the alpha-3 equivalent (IND or GBR)? I can get the alpha-2 codes with: String[] codes = java.util.Locale.getISOLanguages(); That's not a problem, actually my application reads in the alpha-2 code, but I need to output the alpha-3 equivalent . Is ...

Determining information about a phone number and reformatting in PHP

Hi there, I'm looking for a way of determining whether a phone number is in the international format or a local format, and if it's in the international format what country it belongs to. If it's in the local format it should prompt the user for the country code and then convert it into the international format. Examples: 00447749123...