/// <summary> /// 获取应用配置的节点信息 /// </summary> /// <param name="project">项目</param> /// <param name="key">键值</param> /// <returns>本地显示</returns> private static string GetItem(ProjectTypeEnum project, string key) { var lang = LanguageCachedHelper.GetLang(project); var lanJsonResource = LanguageCachedHelper.GetJsonResource(project); var value = lanJsonResource[lang][key]; return(value); }
/// <summary> /// 设置项目默认语言==中文 /// </summary> /// <param name="project">项目类型</param> public static void SetDefault(ProjectTypeEnum project) { var lang = LanguageCachedHelper.GetLang(project); if (lang == LangTypeEnum.none) { LanguageCachedHelper.SetLang(project, LangTypeEnum.zh); } }
/// <summary> /// 获取当前项目的语言类型 /// </summary> /// <param name="project">项目</param> /// <returns>语言</returns> public static LangTypeEnum GetLang(ProjectTypeEnum project) { var lang = LanguageCachedHelper.GetLang(project); return(lang); }