I am trying to make a website voice with 2 or more languages for one language.
When I follow the default route (administrator / action) My current route: extension / How to solve this problem? This is not the most beautiful way, but works for me. (Of course you should replace Html.ActionLink ("NL", ViewContext.RouteData.Values ["action"]. ToString (), New {language = "Nl-NL"}, blank) This works but when the action is called by the action from the parameter, it (logically) only creates a link with the controller as well as the current action parameters Is ignored
routes MapRoute ("ProjectCategory", "{language} / Projects / {action} / {slug}", new {controller = "projects", verb = "extension", slug = string. Empty, language = "en-US"} ); The link created with
html :
http: // localhost / mysite / nl-nl / projects /
HttpContext.Current.Request.Path.Replace ("/ en-US /", "/ Nl-nl /")
en-US with the current code)
Comments
Post a Comment