public override LanguageCollection GetLanguages(CallContext context) { #if DEBUG var timer = Stopwatch.StartNew(); #endif var languages = ReadOnlyProviders.SelectMany(x => x.GetLanguages() ?? EmptyLanguages); var headLanguages = HeadProvider.GetLanguages(context); if (headLanguages != null) { languages = languages.Concat(headLanguages); } languages = languages .GroupBy(x => x.Name).Select(x => x.First()) // .Distinct() .OrderByDescending(x => x.Name == "en"); // en must go first #if DEBUG this.Trace(languages, timer, context); #endif return(new LanguageCollection(languages)); }