title: Get browser language in ASP.NET Core?
body: <p>I am trying to get the default language from the browser and I use the following code to get it:</p>
  
  <pre><code>var languages = HttpContext.Request.UserLanguages;
  </code></pre>
  
  <p>Since the above is not supported with .NET Core 2 I tested with:</p>
  
  <pre><code>var requestContext = Request.HttpContext.Features.Get&lt;IRequestCultureFeature&gt;();
  </code></pre>
  
  <p>However, it returns null. What is the correct way or alternative to get the language?</p>