How to change validation localization?
Please check the official documentation before asking questions: https://docs.abp.io/en/abp/latest/Localization
I followed the documentation and it didn't work

Originally posted by @wingqing1314 in https://github.com/abpframework/abp/issues/4199#issuecomment-638139275
It works after added ErrorMessage .
It has to be ,right?
What is the value of CultureInfo.CurrentUICulture
Make sure your current UI culture is zh-hans.
What is the value of
CultureInfo.CurrentUICultureMake sure your current UI culture is zh-hans.
I just want the response message is in Chinese, not displayed on UI.
Please see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-3.1 learn about localization in ASP.NET Core.
Please see https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-3.1 learn about localization in ASP.NET Core.
Got it!
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<UserHttpApiHostModule>();
services.AddMvc()
.AddDataAnnotationsLocalization(options =>
{
options.DataAnnotationLocalizerProvider = (type, factory) =>
factory.Create(typeof(UserResource));
});
}
Add this code will be work without ErrorMessage 😀