public IActionResult Index() { IList <tzb> tz = tzbRepository.GetNewsList(1, 10); IList <attach> pic = attachRepository.GetPicList(); zh top = new zh(); top.tzb = tz; top.attach = pic; return(View(top)); }
public static void Localize(string lang = "en") { var lan = GetCurrentByType("Language"); Application.Current.Resources.MergedDictionaries.Remove(lan); switch (lang) { case "zh": lan = new zh(); break; default: lan = new en(); break; } Application.Current.Resources.MergedDictionaries.Add(lan); }