am trying to get the default language from the browser and I use the following code to get it:
var languages = HttpContext.Request.UserLanguages;
Since the above is not supported with .NET Core 2 I tested with:
var requestContext = Request.HttpContext.Features.Get<IRequestCultureFeature>();
However, it returns null. What is the correct way or alternative to get the language? i have set it to norweigian in browser.
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (kokkisajee) or Facebook (sajeetharan)