#1,120 – Getting a List of All Supported Cultures

You can get a full list of all cultures supported by .NET using the CultureInfo.GetCultures static method.  (In System.Globalization namespace).

Below is a code sample that dumps out a little bit of information about all known cultures.

            CultureInfo[] cultureList = CultureInfo.GetCultures(CultureTypes.AllCultures);
            foreach (CultureInfo ci in cultureList.OrderBy(cult => cult.Name))
            {
                if (ci.IsNeutralCulture)
                    Console.WriteLine("{0} (neutral) - {1}", ci.Name, ci.EnglishName);
                else
                    Console.WriteLine("{0} - {1}", ci.Name, ci.EnglishName);
            }

1120-001

Advertisements

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

One Response to #1,120 – Getting a List of All Supported Cultures

  1. Pingback: Dew Drop – July 23, 2014 (#1820) | Morning Dew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: