/// <summary> /// Changes the value for specified languages by key. /// </summary> /// <param name="langName">Language name (Lang.Name property).</param> /// <param name="key">Indicates key which value should be changed.</param> /// <param name="newValue">Indicates new value for key</param> public void ChangeLangValue(string langName, string key, string newValue) { var lang = Langs.Single(l => l.Name == langName); lang.ChangeValue(key, newValue); }
/// <summary> /// Returns value by key for specified language. /// </summary> /// <param name="key">Indicates key for searching.</param> /// <param name="langName">Language name (Lang.Name property).</param> /// <returns></returns> public string GetValue(string key, string langName) { string result = Langs.Single(l => l.Name.Equals(langName)).GetValue(key); return(result); }