private Dictionary <string, string> GetDisplayNameLookup(int languageId) { var allKeys = _displayNameResourceKeys.Select(x => x.Value); // Load all known string resources in one go. var resourceQuery = _localizationService.All(languageId); var resourcesLookup = resourceQuery.Where(x => allKeys.Contains(x.ResourceName)) .ToList() .ToDictionarySafe(x => x.ResourceName, x => x.ResourceValue); return(resourcesLookup); }
public IDictionary <string, string> ToJson() { return(localizationService.All().ToDictionary(k => k.Key[0].ToString(CultureInfo.CurrentCulture).ToLowerInvariant() + k.Key.Substring(1), k => k.Value)); }