Howto automatically adds a specific value from the current route to all generated links?

I have a site culture in the following URLs:

routes.MapRoute(
    "Default", 
    "{language}/{controller}/{action}/{id}", 
    languageDefaults, 
    languageConstraints)

And it works like a charm with a little help from the custom MvcHttpHandler, which sets the current thread UI culture for each request based on the route value. My problem is how to automatically add the language route value from the current request to all outgoing links? For instance. when the page / en / foo / bar is requested, I would like this

<%=Html.ActionLink(
    "example link", 
    MVC.Home.Index()) %>

To automatically create the same result as this:

<%=Html.ActionLink(
    "example link", 
    MVC.Home.Index()
        .AddRouteValue(
            "language", 
            this.ViewContext.RouteData.Values["language"]) %>

, , , BeginForm() .. 1000 , .AddRouteValue , 100% .

, Html- ?

+4
1

, , RouteData , - . T4MVC . - :

routes.MapRoute("Default with language", "{lang}/{controller}/{action}/{id}", new
{
    controller = "Home",
    action = "Index",
    id = UrlParameter.Optional,
}, new { lang = "de|fr" });
routes.MapRoute("Default", "{controller}/{action}/{id}", new
{
    controller = "Home",
    action = "Index",
    id = UrlParameter.Optional,
    lang = "en",
});

+

protected void Application_AcquireRequestState(object sender, EventArgs e)
{
    MvcHandler handler = Context.Handler as MvcHandler;
    if (handler == null)
        return;

    string lang = (string)handler.RequestContext.RouteData.Values["lang"];

    CultureInfo culture = CultureInfo.GetCultureInfo(lang);

    Thread.CurrentThread.CurrentUICulture = culture;
    Thread.CurrentThread.CurrentCulture = culture;
}

+

<%: Html.ActionLink("About us", "Detail", "Articles", new { @type = ArticleType.About }, null) %>
+3

All Articles