示例#1
0
        protected override void Initialize(RequestContext requestContext)
        {
            base.Initialize(requestContext);
            var localization = DependencyResolver.Current.GetService <ILocalizationContext>();

            localization.ChangeUrl = lang =>
            {
                var url    = Request.RawUrl;
                var result = LocalizationContext.ReplaceLangInUrl(url, lang);
                return(result);
            };
        }