private void SyncLangFile(LanguageFile lFileEng, LanguageFile lFileSync) { bool changed = false; foreach (EasyPropertiesNode nodeEng in lFileEng.Ps.GetChildProperties()) { if (nodeEng.Name.Equals(LanguageFile.LANGUAGE_PROPERTIES_NODE_NAME)) { continue; } EasyPropertiesNode nodeSync = lFileSync.Ps[nodeEng.Name]; EasyPropertiesNode.Property[] valsEng = nodeEng.GetValues(); foreach (EasyPropertiesNode.Property valEng in valsEng) { if (nodeSync.ContainsProperty(valEng.Name)) { continue; } changed = true; nodeSync.SetValue <string>(valEng.Name, (string)valEng.Value); } } if (!changed) { return; } lFileSync.Save(); }
public string Phrase(string name, string defaultPhrase) { if (!_epn.ContainsProperty(name)) { _owner._modify = true; } return(_epn.GetValue <string>(name, defaultPhrase)); }