Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route localization #36

Open
vkocheryzhkin opened this issue Dec 17, 2012 · 3 comments
Open

route localization #36

vkocheryzhkin opened this issue Dec 17, 2012 · 3 comments

Comments

@vkocheryzhkin
Copy link

Eric, can you suggest how to use MapNavigationRoute if I want to have ru/en/es in my route.
Thank you!

@erichexter
Copy link
Owner

the navigation route is just a system.web route. so you would do this the
same way you would with standard mvc route. add the data token in the
routes. /{ln}/home/ ect....

Eric Hexter

blog | http://Hex.LosTechies.com
info | http://www.linkedin.com/in/erichexter

On Mon, Dec 17, 2012 at 5:29 AM, Vladimir [email protected] wrote:

Eric, can you suggest how to use MapNavigationRoute if I want to have
ru/en/es in my route.
Thank you!


Reply to this email directly or view it on GitHubhttps://github.com//issues/36.

@vkocheryzhkin
Copy link
Author

Sure, but when you chage culture you need to set this token to all other navigation links(m.b. change Url of NamedRoute). Chage /about to be /ru/about while staing on /ru/home page, right?

@erichexter
Copy link
Owner

so you should do something like /{locale}/{controller} in the route.... I current dont have support for tokens with the strongly typed route helpers but the string based ones should support this. as long as you keep the tokens in all of the routes this should work as is.

Another approach is to insert the token into every route after the route table is populated. I actually use this approach for my main work website.

@erichexter erichexter added this to the V3 milestone Dec 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants