ASP.NET Core Request Localization Options

后端 未结 4 1318
失恋的感觉
失恋的感觉 2021-02-05 08:17

Here is my custom request culture provider which returns \"en\" as a default culture if no culture specified in url (for example http://sypalo.com/ru or http://sypalo.com/en). M

4条回答
  •  北海茫月
    2021-02-05 09:03

    Another way to get the Accept-Language header with a framework call (ASP.NET Core):

    HttpContext.Request.GetTypedHeaders().AcceptLanguage

提交回复
热议问题