Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataAnnotationsLocalization cannot localize Enums #41

Open
SalehBagheri opened this issue Dec 23, 2019 · 1 comment
Open

DataAnnotationsLocalization cannot localize Enums #41

SalehBagheri opened this issue Dec 23, 2019 · 1 comment

Comments

@SalehBagheri
Copy link

SalehBagheri commented Dec 23, 2019

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

@sgjsakura
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants