I have some pre-defined URLs in routing table actually directing to same controller and action, but different language. For example
routes.MapRoute(
"Contact", // Route name
"contact", // URL with parameters
new { controller = "Home", action = "Contact", lang="en" } // Parameter defaults
);
routes.MapRoute(
"Contact2", // Route name
"iletisim", // URL with parameters
new { controller = "Home", action = "Contact", lang="tr" } // Parameter defaults
);
When i use Html.ActionLink
in View and run application, URL shows the first route, for example:
@Html.ActionLink(Resources.Contact, "Contact", "Home")
When current language is tr
when page rendered URL is : /contact
which should be /iletisim
instead.
When i change the order of route mappings then en
language pages shows wrong URL.
How can I solve this problem?