protected TranslatedDictionary GetLabels() { var settings = TranslationSettings; settings.AddSettings("General", "Dashboard"); settings.AddSettings("Dashboard", "MainMenu"); var dictionary = translationManager.GetTranslationLabels(LanguageId, settings.ModuleTypes); var translatedDictionary = new TranslatedDictionary(); translatedDictionary.AddRange(dictionary); return(translatedDictionary); }
protected TranslatedDictionary GetLabels() { var settings = TranslationSettings; settings.AddSettings("General", "Dashboard"); settings.AddSettings("Dashboard", "MainMenu"); var languageCookie = httpContextAccessor.HttpContext.Request.Cookies .FirstOrDefault(x => x.Key == "language"); var languageId = 1; if (!languageCookie.IsNullOrDefault()) { languageId = languageCookie.Value.ToInt(); } var labels = translationManager.GetTranslationLabels(languageId, settings.ModuleTypes); var dictionary = new TranslatedDictionary(); dictionary.AddRange(labels); return(dictionary); }