/// <summary> /// Called after the action method executes. /// </summary> /// <param name="filterContext">The filter context.</param> public void OnActionExecuted(ActionExecutedContext filterContext) { var language = I18NSession.GetLanguageFromSession(filterContext.HttpContext) ?? _service.GetBestAvailableLanguageFrom(filterContext.HttpContext.Request.UserLanguages) ?? I18N.DefaultTwoLetterISOLanguageName; filterContext.HttpContext.Response.AppendHeader(ContentLanguageHeader, language); }
public LanguageFilter() { _session = new I18NSession(); _service = DefaultSettings.LocalizingService; }
public LanguageRouteDecorator(RouteBase route) : base(route) { _session = new I18NSession(); }
protected I18NController() { _session = new I18NSession(); }
/// <summary> /// /// </summary> public LanguageFilter() { _session = new I18NSession(); _service = DefaultSettings.LocalizingService; }
protected I18NWebViewPage() { _session = new I18NSession(); }
public LanguageFilter() { _session = new I18NSession(); _service = DependencyResolver.LocalizingService; }