In older asp.net – projects we used to set the language usually within the Application_BeginRequest – Handler (Global.asax), something like this:
System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(cookie.Lang)
Now I am switching to MVC 2 and decided to keep the language as a fix route within the URL. The URL looks like this: {lang}/{controller}/{action}
How and where should I read the language from the URL and set the CurrentCulture? How is it best done the MVC – way?
Thx for any tipps!
Something like this in global.asax should work