Questions tagged [iso-3166]

A standard published by ISO that defines codes for the names of countries, dependent territories, special areas of geographical interest, and their principal subdivisions (e.g., provinces or states). The official name of the standard is "Codes for the representation of names of countries and their subdivisions".

iso-3166
Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Country map - ISO_3166_2 - Zagorje ob Savi - SI-142 not showing

If you use country map for slovenia and have some data for 'SI-142' (Municipality of Zagorje ob Savi) Data is not shown. All other municipalities are working. I tried the previous code (before 1995) ...
Klemen Vrhovšek's user avatar
0 votes
1 answer
195 views

Getting country code (ISO-3166-alpha2 standard) for iOS >= 16 after deprecated Locale.isoRegionCodes API?

We are facing the following issue with the following API Locale.isoRegionCodes which has been deprecated from iOS >= 16. The new API is the following Locale.Region.isoRegions but when doing a ...
Coder's user avatar
  • 103
0 votes
1 answer
172 views

URL Based Localization in .NET core Razor - how to?

I am building a .NET 8.0 Razor Page site where localization/internationalization is made with URLs like: example.org/us // United States example.org/fr // France example.org/pt // Portugal example.org/...
Sha's user avatar
  • 2,397
1 vote
1 answer
56 views

How to find centroids or geolocate ISO 3166 codes?

Is there a way to geolocate ISO 3166-1 alpha-3 codes (see https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) and get the centroid of the item ? I would like to place a marker (a disk ...
PBrockmann's user avatar
0 votes
1 answer
82 views

How to convert coordinates or addresses to ISO 3166 codes

while trying to analyse some data i ran into a problem where i am supposed to convert some locations to their iso3166 equivalence so as to make a need Choropleth map of the data but converting the ...
nkdtech's user avatar
  • 43
2 votes
1 answer
2k views

Java Locale to country codes (ISO 3166)

I have an instance of Locale, for example: Locale l = new Locale("en", "USA"); Now, I want to get the locale in the ISO 3166 format en-US. When I toString it though, I only get ...
Deepesh kumar Gupta's user avatar
2 votes
0 answers
232 views

How to convert ISO 3166-1 values to country name, using kotlin

I have countries like: country = RUS I want to convert like this: country = Russia Is there any way to convert?
Reaf's user avatar
  • 51
1 vote
2 answers
261 views

ISO3166 not importing method properly -Pycharm

Anyone know why this is not working properly. According to https://pypi.org/project/iso3166/ this should work. from iso3166 import countries Get following error: ImportError: cannot import name '...
kosh66's user avatar
  • 70
3 votes
3 answers
4k views

How do I get the country name from a given ISO-3166-1 alpha-2 code in Python?

I want the user to input a ISO-3166-1 alpha-2 code. country_code = input("Please enter a country's two-letter code (e.g. FR, US) :") I then want to translate the code into the country's ...
Akyna's user avatar
  • 87
0 votes
2 answers
299 views

How to convert country names to ISO 3166-1 alpha-2 values in arm template

I have an ARM-template and I would like convert country name like "United States" and I would like to get the ISO 3166-1 alpha 2 code like "US". This converted value I would use ...
Michal Cmajdálka's user avatar
1 vote
1 answer
1k views

How to get a country's official name from a Java Locale?

In ISO-3166, when it comes to the country, there is a difference between "short name" and "full name". For example, Denmark (link to iso.org reference : https://www.iso.org/obp/ui/#...
programminator's user avatar
2 votes
0 answers
2k views

Is there a function in Swift to get the ISO 3166-2 codes (provinces, states) for a country?

For an app I need the users to create addresses. It is important that the addresses are valid and include an ISO 3166 ALPHA-2 country code as well as an ISO 3166-2 code for the province, state, etc. ...
Dennis's user avatar
  • 258
0 votes
1 answer
242 views

Change Location information related with Country to "ISO_3166-2:ES" code

I am using HERE API to search for a request that gives me a Location dta object giving latitude and longitude. I am receiving Country information in "ISO_3166-1_alpha-3", which is ISO by default. ...
Alberto Barón's user avatar
2 votes
2 answers
1k views

How to get ISO 3166 Country Code from CultureInfo in .NET

Given a CultureInfo object, how do I get the two character ISO 3166 Country Code? E.g. from en-US, I want US and from en-GB, I want GB. I also need to handle cases where the culture may not have a ...
Muhammad Rehan Saeed's user avatar
0 votes
1 answer
614 views

nodejs - iso 3166 - Alternative countries names

I'm writing a program that extracts countries from https://restcountries.eu/ I'm using the data to save in my mongo DB and update it. ofc, the data doesn't change too often, but this is for a decade ...
No Idea For Name's user avatar
0 votes
1 answer
1k views

Get ISO 3166-2 Code from Bing Maps Locations API

Is there a way to get the ISO 3166-2 Code for a specific PostalCode/CountryCode Combination with the Bing Maps Locations API? Per Example: 1210/AT => AT-9
Mathias's user avatar
  • 317
0 votes
1 answer
422 views

Get ISO 3166-2 Code from HERE Geocoder API

Is there a way to get the ISO 3166-2 Code for a specific PostalCode/CountryCode Combination with the HERE Geocoder API? Per Example: 1210/AT => AT-9
Mathias's user avatar
  • 317
1 vote
0 answers
302 views

How to retrieve or enumerate ISO-3166 numeric codes?

With EnumSystemLocalesEx I can enumerate supported countries and get the ISO-3166-Alpha 2 code. With GetLocaleInfoEx I can retrieve the language name and the ISO-3166-Alpha 3 code. The list of ...
xMRi's user avatar
  • 15.2k
1 vote
2 answers
3k views

NetSuite data import with country code?

Question for the NetSuite experts: Before my time, my current company decided to move to NetSuite. I'm being asked to retrieve customer data from our in-house SaaS and reformat it for import to ...
Philip Schlesinger's user avatar
3 votes
1 answer
3k views

osm overpass query by country

I am using this Overpass query to extract all coworking amenities in Italy. ( area["ISO3166-1"="IT"];) ->.a; node["amenity"="coworking_space"] (area.a); (._;>;); out ...
Jacopo's user avatar
  • 163
2 votes
1 answer
3k views

Fetch ISO-3166-2 code from Google Maps API. Is it possible?

I need to match locations recorded with their coordinates (latitude/longitude) to the visitor's selection from an interactive map using region codes (ISO-3166-2). Anyone has a take on this please? ...
FusionDesign's user avatar
0 votes
1 answer
2k views

Use PYCOUNTRY to convert ISO 3166-1 alpha-2 to Country Name

Python (and coding newbie) here. I'm attempting to generate an XML file based a list of files in a directory. The first two letters of the filenames correspond to a new letter country code and I'm ...
RMcLellan's user avatar
23 votes
7 answers
26k views

Getting the user's region with navigator.language

For some time, I've been using something like this to get my user's country (ISO-3166): const region = navigator.language.split('-')[1]; // 'US' I've always assumed the string would be similar to en-...
Jeff's user avatar
  • 2,333
0 votes
1 answer
422 views

.Net: get ISO3166 code for German country name

I got 2 methods: one that converts a given ISO3166 code to the corresponding country's name in German (e.g. "de-DE" to "Deutschland"). This works fine. Now I need a method that works the other way ...
Cleo's user avatar
  • 839
0 votes
1 answer
1k views

Locale and ISO3CountryCodes

I have seen recently in java 1.7 that if I loop on Locales and get the ISO3Country code for the same then for Locale "CS" it gives me error "couldn't find 3 letter country code CS". Is it expected ...
NaiveCoder's user avatar
8 votes
4 answers
8k views

Country name to ISO 3166-2 code

I know how to convert an ISO 3166-2 code to the full English name, e.g. "US" to "United States" by using RegionInfo. However, how can I do the opposite, i.e. that takes "United States" and returns "...
jacobz's user avatar
  • 3,261
1 vote
3 answers
945 views

Determining customary distance unit from ISO 3166 country code

ISO 3166 defines country codes such as GB, US, FR or RU. I would like a reasonably definitive association from these country codes to the customary unit of measure for distances between places in ...
Benjohn's user avatar
  • 13.6k
2 votes
2 answers
1k views

How to find ISD code from ISO 3166 code?

I want to show ISO 3166 country code and its ISD code in list Like: ind +91 irq +964 ita +39 With the help of java.util.Locale I have got all ISO 3166 country codes but now I want ISD codes of ...
DCoder's user avatar
  • 3,418
0 votes
1 answer
361 views

country-language code (ISO 3166) in actionscript

Is there a way to get the country-language code in ISO 3166 (for example: US_en) in actionscript with zinc like I would do in objectiveC: NSString* language = [[NSLocale preferredLanguages] ...
AndyPipkin's user avatar
9 votes
1 answer
7k views

How to get the numeric code of all ISO 3166-1 countries in C#

I need to get the numeric codes of ISO 3166-1 countries in C#. It seems with the RegionInfo class I can only get the Alpha2 and Alpha3 codes. Is it possible to get the ISO 3166-1 numeric codes in C#...
Manuel's user avatar
  • 2,113
60 votes
11 answers
94k views

How to convert country names to ISO 3166-1 alpha-2 values, using python

I have a list of countries like: countries=['American Samoa', 'Canada', 'France'...] I want to convert them like this: countries=['AS', 'CA', 'FR'...] Is there any module or any way to convert ...
MHS's user avatar
  • 2,300
3 votes
2 answers
5k views

Unsupported ISO 3166 country ES?

My Android app from what I've tested works fine with UK and US locales, but when I change the locale to ES I receive the following error: java.lang.IllegalArgumentException: Unsupported ISO 3166 ...
KingFu's user avatar
  • 1,348
6 votes
5 answers
17k views

How to get ISO 3166-1 compatible country code?

I am working on displaying list of timezones by country name. As answered here: Country to timezones in PHP/Zend Framework I am thinking to call DateTimeZone::listIdentifiers(DateTimeZone::...
Krishna Shetty's user avatar
1 vote
3 answers
5k views

Country name to ISO 3166-1 alpha 2 code

I have a country name like Australia and I would like to get the ISO 3166-1 alpha 2 code like AU in this case. Is there a way to easily do this in .NET?
Sachin Kainth's user avatar
2 votes
1 answer
3k views

Mapping ISO-3166-1 country codes to phone number prefix

I am looking for the best way of translating country codes to phone number prefixes. For example, SE should map to +46, NO to +47, etc. Any open source java library out there that does the job ?
Jan-Olav Eide's user avatar
2 votes
3 answers
2k views

ISO 3166-1 alpha-2 comma separated values

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 ...
chx's user avatar
  • 11.5k
67 votes
1 answer
50k views

Is there a good flag icon pack that corresponds to ISO-3166 Country Codes? [closed]

I'm in need of an icon pack containing flags that correspond with ISO-3166 country codes such as US, CA, SE, DE etc. Optimally the flag icons would have names such as us.png, ca.png and so on. I'm ...
Hubro's user avatar
  • 57.8k
3 votes
1 answer
5k views

ISO 3166-1 alpha-2 MySQL database with regions

I'm trying to create two different tables with ISO 3166 2 code database for countries and trying to add a custom field with regions (North America, Europe, South America, etc). I've been trying to ...
pablora's user avatar
  • 526
1 vote
1 answer
7k views

Retrieving Country (ISO 3166-1) and Region (ISO 3166-2) codes from address (using existing web services) [duplicate]

Are there any web services or DBs available that will be able to return the ISO 3166-1 and ISO 3166-2 (Country & region) codes given a particular address or latitude/longitude coordinates? I'm ...
Prembo's user avatar
  • 2,256
2 votes
2 answers
922 views

ISO 3166-1 to woeid

Where do I find a list of all countries woeid from their ISO 3166-1 alpha2 or alpha3 codes?
Muleskinner's user avatar
  • 14.3k
97 votes
15 answers
114k views

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 ...
Jason Jenkins's user avatar