Click here to Skip to main content
13,139,682 members (45,369 online)
Click here to Skip to main content
Add your own
alternative version


6 bookmarked
Posted 16 Mar 2014

Sorted List of Available Cultures in .NET

, 16 Mar 2014
Rate this:
Please Sign up or sign in to vote.
Get alphabetically ordered list of available cultures in .NET


If you ever wanted to populate a drop down list (combo box) with a list of available cultures, for sure you have had the following problem: the list CultureInfo.GetCultures() provides you an alphabetically unsorted list. The following code snippet will help you sort cultures based on your criteria.

There is nothing fancy here, just using the existing List.Sort() and string.Compare() functions provided by .NET.


Check CultureInfo class on MSDN here.

Using the Code

The following piece of code returns CultureTypes.SpecificCultures list, alphabetically ordered by culture's NativeName. You can change it to sort by EnglishName, DisplayName or any other CultureInfo property you want.

/// <summary> Alphabetically ordered list of cultures </summary>
/// <param name="cultureType">Culture type</param>
/// <returns>Alphabetically ordered list of cultures</returns>
public IEnumerable<CultureInfo> GetCultureList(CultureTypes cultureType = CultureTypes.SpecificCultures)
    var cultureList = CultureInfo.GetCultures(cultureType).ToList();
    cultureList.Sort((p1, p2) => string.Compare(p1.NativeName, p2.NativeName, true));
    return cultureList;

Points of Interest

Always use the already existing .NET functionality as your first choice, fallback to custom solution when not otherwise possible.

Have fun!


  • Version 1.1 - Grammar and spell fixes
  • Version 1.0 - Initial version


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer
Romania Romania
I have been a software developer for a while and still find this an interesting job.

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170915.1 | Last Updated 16 Mar 2014
Article Copyright 2014 by rzvdaniel
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid