| | |
| | | { "zh-Hans", "HFieldName"}, |
| | | { "zh-Hant", "HFieldName"}, |
| | | { "en", "HTranslationText_English"}, |
| | | { "es", "HTranslationText_Spain"} |
| | | { "es", "HTranslationText_Spain"}, |
| | | { "Thai", "HTranslationText_Thai"} |
| | | }; |
| | | |
| | | /// <summary> |
| | |
| | | language = "zh-Hans"; |
| | | lang = "HFieldName"; |
| | | } |
| | | ds = oCN.RunProcReturn("select * from h_v_Xt_LanModuleList where 1=1", "h_v_Xt_LanModuleList"); |
| | | ds = oCN.RunProcReturn("select * from h_v_Xt_LanModuleList where 1=1 order by HUpdateDate desc", "h_v_Xt_LanModuleList"); |
| | | |
| | | // 如果目录不存在则创建目录 |
| | | if (!Directory.Exists(path)) |
| | |
| | | { |
| | | languagePack["_Version"] = 0; |
| | | } |
| | | if (languagePack["_UpdateDate"] == null) |
| | | { |
| | | languagePack["_UpdateDate"] = ""; |
| | | } |
| | | LogService.Write("语言包中数据条数: " + languagePack["_Version"].ToString() + "\n数据库中数据条数: " + ds.Tables[0].Rows.Count.ToString()); |
| | | if (languagePack["_Version"].Value<int>() != ds.Tables[0].Rows.Count || forceUpdate == true) |
| | | if (languagePack["_Version"].Value<int>() != ds.Tables[0].Rows.Count || forceUpdate == true || languagePack["_UpdateDate"].Value<string>() != ds.Tables[0].Rows[0]["HUpdateDate"].ToString()) |
| | | { |
| | | // 更新版本号(数据条目数) |
| | | languagePack["_Version"] = ds.Tables[0].Rows.Count; |
| | | //更新字段翻译日期 |
| | | languagePack["_UpdateDate"] = ds.Tables[0].Rows[0]["HUpdateDate"].ToString(); |
| | | // 统计每个字符模块中 字段码出现的次数 如果出现多次,则映射为JArray类型 |
| | | Dictionary<string, int> HFieldCodeDict = ds.Tables[0].AsEnumerable() |
| | | .GroupBy(row => new |