void SaveData(string type, string lang, Dictionary <string, string> lst) { string resLang1 = Path.Combine(LocalizationRoot, lang + ".json"); var data = new AbpResourceFile { Culture = lang, Texts = lst.OrderBy(e => e.Key).ToDictionary(e => e.Key, e => e.Value) }; File.WriteAllText(resLang1, JsonConvert.SerializeObject(data, Formatting.Indented)); }
private Dictionary <string, string> GetItems(string type, string locale) { var ret = new Dictionary <string, string>(); string resPath = Path.Combine(LocalizationRoot, locale + ".json"); if (File.Exists(resPath)) { var txt = File.ReadAllText(resPath); AbpResourceFile file = JsonConvert.DeserializeObject <AbpResourceFile>(txt); ret = file.Texts; } return(ret); }