private static int SaveResourceStrings(int LanguageID, Dictionary <string, string> resources) { int total = 0; foreach (KeyValuePair <string, string> kvp in resources) { string resourceName = kvp.Key; string resourceValue = kvp.Value; LocaleStringResourceManager.InsertLocaleStringResource(LanguageID, resourceName, resourceValue); total++; } return(total); }
public LocaleStringResource SaveInfo() { LocaleStringResource localeStringResource = LocaleStringResourceManager.GetLocaleStringResourceByID(this.LocaleStringResourceID); if (localeStringResource != null) { localeStringResource = LocaleStringResourceManager.UpdateLocaleStringResource(localeStringResource.LocaleStringResourceID, localeStringResource.LanguageID, txtResourceName.Text, txtResourceValue.Text); } else { localeStringResource = LocaleStringResourceManager.InsertLocaleStringResource( this.LanguageID, txtResourceName.Text, txtResourceValue.Text); } return(localeStringResource); }