Questions tagged [country-codes]

ISO-3166 standard defining 2 and 3 character identifiers for each country in the world.

326 questions
18
votes
4 answers

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…
Mbg
  • 183
  • 1
  • 1
  • 4
18
votes
2 answers

List of all top level domains

I found a lot of threads explaining how to get the country-codes in two- or three-letter format, but nothing that fits to my task. I'm heading for a way to get all the top level domains in an array or something. I know there's the CultureInfo class…
user1826831
  • 735
  • 3
  • 9
  • 17
18
votes
6 answers

Country codes list - C#

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.
Tejaswi Yerukalapudi
  • 8,987
  • 12
  • 60
  • 101
16
votes
3 answers

Load Country Flag From Geonames API using JSONP technique

This Request.JSON http://mootools.net/demos/?demo=Request.JSON using JSON data in a way like this, var data = {"previews":[ {"Countrycode":"us", "src":"us.jpg", "description":"desc will be here"}, {"Countrycode":"uk", "src":"uk.jpg",…
Arif
  • 1,222
  • 6
  • 29
  • 60
14
votes
3 answers

Get continent name from country using pycountry

How to convert continent name from country name using pycountry. I have a list of country like this country = ['India', 'Australia', ....] And I want to get continent name from it like. continent = ['Asia', 'Australia', ....]
VIBHU BAROT
  • 317
  • 2
  • 4
  • 13
14
votes
9 answers

Source of data for "official" country/region list

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…
jfrobishow
  • 2,897
  • 2
  • 27
  • 42
12
votes
1 answer

How can I detect if an Android app is being used in Korea?

I have a game in the Google Play Store that has an option to change the scoring system from points to $'s. Apparently this is a simulation of gambling and illegal in South Korea. I got a official reprimand from Google and they took my app off of the…
theJosh
  • 2,894
  • 1
  • 28
  • 50
11
votes
2 answers

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). …
prismofeverything
  • 8,799
  • 8
  • 38
  • 53
11
votes
7 answers

Get iOS current language (including country code)

I need to get a string like en_US or es_ES in iOS. The obvious method is to use [NSLocale currentLocale] and get the language info from there. However, that gives you the "region format" and not the actual device language, which means that if you…
hasvn
  • 1,054
  • 1
  • 11
  • 15
11
votes
3 answers

Country name from ISO short code in dictionary, how to deal with non-ascii chars

I'm making a webapp that takes country short code (google app engine get from request header) and I want to get the country name (full name) not just the 2 letter initials. I tried making a python dictionary but it breaks bkz the names have…
user772401
  • 2,754
  • 3
  • 31
  • 50
10
votes
0 answers

Three letter country code on iOS

I know you are able to get the two letter country code on iOS, for all countries. But is there a way to get the three letter country code? So from http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 to…
Cosmin
  • 2,840
  • 5
  • 32
  • 50
9
votes
3 answers

IOS: country code

I have this code to obtain a code country, but I want to see all code country available; then I can do some "if" to implement in my app NSLocale *locale = [NSLocale currentLocale]; NSString *countryCode = [locale objectForKey:…
cyclingIsBetter
  • 17,447
  • 50
  • 156
  • 241
9
votes
1 answer

Geopy: retrieving country names in English

I am trying to reverse geocode coordinates and retrieve corresponding country codes using geopy. However, Geopy does not seem to provide a method for fetching country codes. So, I am trying to retrieve country names first, and then convert them to…
ApplePi
  • 93
  • 2
  • 4
9
votes
1 answer

iOS: Convert ISO Alpha 2 to Alpha 3 country code

Is it possible to convert ISO 3166 alpha-2 country code to alpha 3 country code in iOS, for instance DE to DEU?
Koteg
  • 497
  • 7
  • 16
8
votes
2 answers

What is the difference between 'de' and 'de-DE' language codes?

I notice that i can choose in some places* between those languages: de - German - Deutsch de-DE - Deutsch(Deutschland) - German(Germany) *Android initial device setup, chromium browser in language settings. if one selects de-DE in chromium, it…
bhelm
  • 695
  • 1
  • 7
  • 14
1
2
3
21 22