C# PO文件本地化未按预期用于数据批注

C# PO文件本地化未按预期用于数据批注,c#,asp.net-core-2.0,po,C#,Asp.net Core 2.0,Po,我在asp.net核心应用程序中使用了Orchard本地化 Startup.cs services.AddPortableObjectLocalization(options => options.ResourcesPath = "Resources"); services .AddMvc() .AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix) .AddDataAnnotationsLocalization();

我在asp.net核心应用程序中使用了Orchard本地化

Startup.cs

services.AddPortableObjectLocalization(options => options.ResourcesPath = "Resources");
services
.AddMvc()
.AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix)
.AddDataAnnotationsLocalization();
[Display(Name = "First Name")]
[Required(ErrorMessage = "Customer first name required")]
public string CustomerFirstName { get; set; }
model.cs

services.AddPortableObjectLocalization(options => options.ResourcesPath = "Resources");
services
.AddMvc()
.AddViewLocalization(LanguageViewLocationExpanderFormat.Suffix)
.AddDataAnnotationsLocalization();
[Display(Name = "First Name")]
[Required(ErrorMessage = "Customer first name required")]
public string CustomerFirstName { get; set; }
en.po(包含英文翻译)

no.po(包含挪威语翻译)

请求英文url

Home/HomeRequest/?cid=40&culture=en
挪威语的请求url

Home/HomeRequest/?cid=11&culture=no
我首先输入了英文url,并检查了所需的验证,英文本地化的验证完全正确。然后我将cid和culture的值改为挪威语,并用英语本地化而不是挪威语检查验证


如何根据区域设置获得数据注释验证?

问题是
OrchardCore.Localization.Core
nuget包中的一个错误,现在已修复。将软件包更新到
1.0.0-beta3-71025版本或更高版本以解决此问题。

你可以找到这个问题的线索

你对此有什么解决方案吗?没有,但我找到了一种方法,之前我做的是通过编程将区域性附加到url,但现在我没有这样做,而是在开始指向自身时将区域性附加到url,它可以根据我的要求正常工作。但我还不知道如何通过编程来处理它。Orchard本地化中有一个bug,如果得到修复,您可以更新它。