嗨我想利用great article在我的mvc3网站上提供本地化功能。如果没有区域是可以正常使用,但将在我的网站领域我得出这样的问题:htmlHelper.RouteLink不生成我想要的网址
htmlHelper.RouteLink(linkText, globalisedRouteData)
其中globalisedRouteData:
4 Keys: Culture, Area, Controller, Action
4 values: en, soluciones, home, index
没有产生预期的(对我来说):主机/ EN/SOLUCIONES/home /索引 但是:/ soluciones/Home?culture = en
什么是打破我这是?文化= en。为什么没有被嵌入到/ en /中,因为它包含在globalisedRouteData中?
在我的RegisterRoutes,我放在:
const string defautlRouteUrl = "{area}/{controller}/{action}/{id}";
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
RouteValueDictionary defaultRouteValueDictionary = new RouteValueDictionary(new {area="soluciones_de_salud", controller = "Home", action = "Index", id = UrlParameter.Optional });
routes.Add("DefaultGlobalised", new GlobalisedRoute(defautlRouteUrl, defaultRouteValueDictionary));
Thanks¡¡