public JsonResult Create(AuditDictionaryItem item) { var languages = localizationService.GetAllLanguages(); var mainLanguage = localizationService.GetDefaultLanguageIsoCode(); var ok = false; var mainLanguageDictionary = new ImportExportDictionaryItem { Key = item.Key, ParentKey = item.ParentKey, Value = string.Empty, LanguageCode = mainLanguage }; mainLanguageDictionary.Translations = new Dictionary <string, string>(); if (!languageDictionaryService.ParentExists(item.ParentKey)) { var parentDictionaryItem = new ImportExportDictionaryItem { Key = item.ParentKey, Value = item.Key, LanguageCode = mainLanguage, Translations = new Dictionary <string, string>() }; languageDictionaryService.CreateDictionaryItem(parentDictionaryItem); } foreach (var language in languages) { if (language.IsoCode != mainLanguage) { mainLanguageDictionary.Translations.Add(language.IsoCode, string.Empty); } } var result = languageDictionaryService.CreateDictionaryItem(mainLanguageDictionary); if (result.Item2) { ok = true; } else { ok = false; } return(base.Json(new { Created = ok }, JsonRequestBehavior.DenyGet)); }