- 1
- 2
- 3
- 4
- 5
var languageCodes = locales
.GroupBy(l => l.Key.Substring(0, 2))
.Select(group => group.First())
.Select(l => new KeyValuePair<string, string>(l.Key.Substring(0, 2), l.Value))
.OrderBy(l => l.Value);
Follow us!