AspNetCore icon indicating copy to clipboard operation
AspNetCore copied to clipboard

DataAnnotationsLocalization cannot localize Enums

Open SalehBagheri opened this issue 5 years ago • 1 comments

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

SalehBagheri avatar Dec 23 '19 10:12 SalehBagheri

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.

sgjsakura avatar Apr 28 '20 18:04 sgjsakura