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.开发者_开发百科
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.
精彩评论