ASP.NET MVC - Localization route
Posted
by ropstah
on Stack Overflow
See other posts from Stack Overflow
or by ropstah
Published on 2009-11-11T00:13:16Z
Indexed on
2010/04/20
4:33 UTC
Read the original article
Hit count: 530
Hi,
i'd like to create localized URL's for my site. They should obviously point to the same controller actions, but I want the first routevalues to -always- be the location/language specification. Is this possible?
http://www.website.com/
en/us
/controller/actionhttp://www.website.com/
en/gb
/controller/action
I understand it can be done by defining {language}
and {location}
in every route, but i'm looking for a slick, non-hacky solution.
© Stack Overflow or respective owner