Skip to main content
2 of 2
Fixed code sample
Dan Solovay
  • 2.2k
  • 18
  • 31

You can use LanguageComparer to apply this ordering:

var sortedLangauges = currentItem.Database.GetLanguages.OrderBy((x => x),new LanguageComparer(currentItem.Database));

This is what the ContextEditor.SortLangauges setting uses behind the scenes.

Dan Solovay
  • 2.2k
  • 18
  • 31