2012-09-07

Country/language codes for CultureInfo

If you work frequently with internationalization/globalization you've probably questioned which cultures are supported in the CultureInfo class. As far as I know, there is no such page in MSDN. However, for the record, the code is composed by a two letter lower case ISO code for language (e.g. "pt", "en") and two letter upper case ISO code for country (e.g. "PT", "US"), separated by the hyphen character ("-"). Both of these codes are documented in Wikipedia as ISO 3166-1 alpha 2 and ISO 639-1, respectively.

Note: this is basically a repost from my previous blog.

Update (2013-03-12)

If you need to match cultures with countries (via the ISO 3 letter code), the following MSDN page might be useful: National Language Support (NLS) API Reference.

No comments:

Post a Comment