ASP.NET Middleware doesn't preserve culture anymore

后端 未结 2 1017
礼貌的吻别
礼貌的吻别 2021-01-18 12:17

Given

asp.net 4 with mvc 5.2.3 and .net 4.6.1

I want to change the CurrentCulture support globalization based on some request related thing

2条回答
  •  耶瑟儿~
    2021-01-18 12:59

    This article looks like what you need.

    Are you using the app.UseRequestLocalization(); in the Configure method?

    UPDATE

    Have a look at this module. I've downloaded the sample and it works (you have to update some nuget packages to be able to build it.) The sample works by providing the culture in the url, but that can be configured. This works with .NET 4.6.1.

提交回复
热议问题