Marin
Marin

Reputation: 1331

Enumerate countries in various languages ISO 3166 using Win32

Is there a way to enumerate all countries and their ISO 3166 codes using some Win32 API or similar? Preferably, in both English and German.

Upvotes: 0

Views: 543

Answers (1)

Hans Passant
Hans Passant

Reputation: 941465

The Windows version you target is important, the NLS api was considerably improved for Vista. EnumSystemLocalesEx() is probably what you are looking for, it returns locales names as a <language> <REGION> string where language is the lowercase ISO 639 language code and REGION is the ISO 3166 country/region identifier. German or English doesn't matter, these codes are language independent. Have a look-see at the NLS api docs to see what's available.

Upvotes: 1

Related Questions