Hi,
Have you tried passing on routevalues in your Html.BeginForm? An example would be
Html.BeginForm("Action", null, new { node = yourcontentlink, language = yourlanguagecode }) Html.BeginForm("Action", "Controller", new { language = yourlanguagecode })
It works if I specify route values explicitly but my thought was that this should work out of the box? The form is in a standard view (no partial). If I have to explicitly set language in all cases then there's a lot of rework to be done :(
I get the exact same behavior for Url.Action... it never respects the language. Is this something in the configuration I've missed?
FYI, we have a 1:1 mapping between host url and language, so we never have language explicitly in the url, i.e. site.dk => da-DK, site.se => sv-SE
After some investigation this has been confirmed by Episerver to be a bug in the 7.5 routing, and has been reported here: Bug #119805: Language is resolved wrongly when using e.g. @Html.BeginForm or @Html.ActionLink
We have a multi-language site with one language available per host url. But we can't seem to get the post url correctly localized in our forms, using Html.BeginForm. It's always producing a url from the default language. I can make it work if I explicitly set the url using UrlResolver, but shouldn't this work out of the box just by passing actionName and controller?