I am trying to get the default language from the browser and I use the following code to get it:
var languages = HttpContext.Request.UserLanguages;
You have to add the localization middleware to enable parsing of the culture header, and then get the value through IRequestCultureFeature.
Check this link : https://github.com/aspnet/Mvc/issues/3549