/// <summary> /// Method to extract all translatable strings from an object. /// </summary> /// <returns></returns> public override List<string> GetXlateStrings() { List<string> xlateStrings = base.GetXlateStrings(); xlateStrings.AddRange(PreselectedValues .Where(e => e.IsStandardValue) .Select(e => e.Value.Value)); return xlateStrings; }
/// <summary> /// Method to extract all translatable strings from an object. /// </summary> /// <returns></returns> public override List <string> GetXlateStrings() { var xlateStrings = base.GetXlateStrings(); //Add preselected values to translation xlateStrings.AddRange(PreselectedValues .Where(e => e.IsStandardValue) .Select(element => element.Value)); return(xlateStrings); }
/// <summary> /// Method to set all translatable strings on an object. The "key" is the original string /// value and the "value" is the translated string value. /// </summary> /// <param name="xlateStrings"></param> public override void SetXlateStrings(IDictionary<string, string> xlateStrings) { base.SetXlateStrings(xlateStrings); foreach (IQVarElement<IQEnum> element in PreselectedValues.Where(e => e.IsStandardValue)) { string xlateString; if (xlateStrings.TryGetValue(element.Value.Value, out xlateString)) element.Value.Value = xlateString; } }
private IQEnum FindPreselectedIQEnumByKey(int pKey) { return PreselectedValues.Where(e => e.IsStandardValue) .Select(e => e.Value) .FirstOrDefault(e => e.Key == pKey); }