protected virtual void InsertLocales(NewsItem newsItem, NewsItemModel newsItemModel) { if (newsItemModel.LanguageId <= 0) { return; } newsItemModel.Locales.Add(new NewsItemLocalizedModel() { LanguageId = newsItemModel.LanguageId, Name = newsItemModel.Name, }); foreach (var localized in newsItemModel.Locales) { //ILocalizedPropertyService.SaveLocalizedValue(NewsItem, // x => x.Name, // localized.Name, // localized.LanguageId); #region LocalizedProperty _localizedPropertyService.InsertLocalizedProperty(new LocalizedProperty() { EntityId = newsItem.Id, LanguageId = localized.LanguageId, LocaleKeyGroup = "NewsItem", LocaleKey = "title", LocaleValue = newsItem.Name }); _localizedPropertyService.InsertLocalizedProperty(new LocalizedProperty() { EntityId = newsItem.Id, LanguageId = localized.LanguageId, LocaleKeyGroup = "NewsItem", LocaleKey = "summary", LocaleValue = newsItem.Short }); _localizedPropertyService.InsertLocalizedProperty(new LocalizedProperty() { EntityId = newsItem.Id, LanguageId = localized.LanguageId, LocaleKeyGroup = "NewsItem", LocaleKey = "content", LocaleValue = newsItem.Full }); #endregion ////search engine name //var seName = NewsItem.ValidateSeName(localized.SeName, localized.Name, false); //_urlRecordService.SaveSlug(NewsItem, seName, localized.LanguageId); } VerboseReporter.ReportSuccess("Sửa ngôn ngữ tin tức thành công", "put"); }