/// <summary> /// Получаем текст из необходимого словаря /// </summary> /// <param name="elName">Название элемента</param> /// <returns>Текст на определенном языке или название элемента</returns> public static string GetTextInSetLaunguage(string elName) { string textTarg; switch (UISettings.Current.language) { case UISettingsAttributes.Language.English: textTarg = English.ContainsKey(elName)? English[elName] : String.Empty; break; case UISettingsAttributes.Language.Lithuanian: textTarg = Lithuanian.ContainsKey(elName) ? Lithuanian[elName] : String.Empty; break; case UISettingsAttributes.Language.Russian: textTarg = Russian.ContainsKey(elName) ? Russian[elName] : String.Empty; break; default: textTarg = English.ContainsKey(elName) ? English[elName] : String.Empty; Debug.Assert(false, "Unknown Language"); break; } Debug.Assert(!String.IsNullOrEmpty(textTarg), "Can't find translation of:\t" + elName); return(!String.IsNullOrEmpty(textTarg) ? textTarg : "Error!!! " + elName); }