protected override void InitializePage() { var cultureName = Culture; Localizer = Localizer.GetCurrent(cultureName); base.InitializePage(); }
/// <summary> /// Returns an anchor element (a element) that contains the virtual path of the specified action, with localized anchor text. /// </summary> public static MvcHtmlString ActionLinkLocalized(this HtmlHelper htmlHelper, string neutralLinkText, string actionName, object routeValues) { string cultureName = System.Globalization.CultureInfo.CurrentCulture.ToString(); var linkText = Localizer.GetCurrent(cultureName).Get(neutralLinkText); return(htmlHelper.ActionLink(linkText, actionName, routeValues)); }