Beispiel #1
0
        /// <summary>
        /// Adds the culture to the route.
        /// </summary>
        /// <returns>Redirects to the index page.</returns>
        public IActionResult SetLocalization()
        {
            var userLanguage = HttpContext.Request.Headers["Accept-Language"].ToString().Split(',').First();
            var cultureName  = FWApp.GetCulture(userLanguage);

            return(RedirectToAction("Index", new { culture = cultureName }));
        }