我有这条路线:
routes.MapRoute(
name: "Default",
url: "{culture}/{controller}/{action}/{id}/{text}",
defaults: new { culture = "en", controller = "Account", action = "Index", id = UrlParameter.Optional, text = UrlParameter.Optional },
constraints: new { culture = supportedCulture }
);
在global.asax中,我添加了一个带有文化的cookie:
Response.Cookies.Add(new HttpCookie("_culture", CultureName));
我想从该Cookie中检索默认文化。
任何想法都将不胜感激。