using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace HH.WMS.WebUI.LanService { public class LanServiceDll { public static string translate(string key) { var cookie = HttpContext.Current.Request.Cookies.Get("lanGroup"); string language = cookie == null ? "zh_CN" : cookie.Value; string text = ""; var lanGroup = HttpRuntime.Cache.Get("lanGroup") as Dictionary>; if (lanGroup != null && lanGroup.Keys.Contains(language)) { Dictionary _lanGroup = lanGroup[language]; if (!string.IsNullOrEmpty(key) && _lanGroup.Keys.Contains(key)) { text = _lanGroup[key]; } } return text; } } }