AspNetCore
AspNetCore copied to clipboard
DataAnnotationsLocalization cannot localize Enums
I use asp-enum-for
tag attribute to display enums. but DataAnnotationsLocalization is not working on [Display(Name="ValueName")]
attribute of each value. It displays only the initial text provided and it never changes by changing language or CurrentCulture
.
ASP.NET Core 3.1 Visual Studio 2019 16.4.2
Hi, thanks for your feedback, the enum display text is control by asp-text-source
attribute and maybe you can try set it and see if the text is changed properly.