Jul
29
Addition to ASP.NET MVC Localization - Using routing
In my previous post I described the way of localization using session, but in real-world applications it's definitely not the best way of localization. Now I'll describe very simple and very powerful way of storing it in URL using routing mechanism.
Also this way of localization will not require OutputCache tricks described in previous post
The goal of this post is to show how to get URL like this /{culture}/{Controller}/{Action}... in your application like /ru/Home/About.
Custom Route Handlers
First of all we'll need to extend standard MvcRouteHandler class.
Also this way of localization will not require OutputCache tricks described in previous post
The goal of this post is to show how to get URL like this /{culture}/{Controller}/{Action}... in your application like /ru/Home/About.
Custom Route Handlers
First of all we'll need to extend standard MvcRouteHandler class.