RedaktHotel.Web/Controllers/HomeController.cs
/// <summary>
/// This controller action demonstrates that Redakt and MVC can work side by side without any issues.
/// In this example, the MVC controller only serves as a "splash" page, redirecting the browser to one of the supported website language homepages based on the browser detected language.
/// </summary>
This controller action demonstrates that Redakt and MVC can work side by side without any issues.
In this example, the MVC controller only serves as a "splash" page, redirecting the browser to one of the supported website language homepages based on the browser detected language.
This controller action demonstrates that Redakt and MVC can work side by side without any issues . In this example the MVC controller only serves as a " splash " page redirecting the browser to one of the supported website language homepages based on the browser detected language .
public IActionResult Index()
        {
            var requestContext = Request.HttpContext.Features.Get<IRequestCultureFeature>();
            switch (requestContext.RequestCulture.Culture.NeutralCulture()?.Name)
            {
                case "nl": return Redirect("/nl");
                default: return Redirect("/en");
            }
        }
public IActionResult Index ( ) { var requestContext = Request . HttpContext . Features . Get < IRequestCultureFeature > ( ) ; switch ( requestContext . RequestCulture . Culture . NeutralCulture ( ) ? . Name ) { case " " : return Redirect ( " " ) ; default : return Redirect ( " " ) ; } }
This controller action demonstrates that Redakt and MVC can work side by side without any issues.
This controller action demonstrates that Redakt and MVC can work side by side without any issues .
// Detect current browser language and redirect to the appropriate supported website languages.