Open epsitec opened 5 years ago
+1 add support for data annotations validations
For the first step to resolve this issue, I published "LocalizedDataAnnotationsValidator" component for Blazor.
This component is built on "Microsoft.Extensions.Localization" infrastructure, therefore, a combination with this "Blazor I18n Text" doesn't work at this time.
For the next step, I'll integrate this "Blazor I18n Text" into "Microsoft.Extensions.Localization" infrastructure.
In the plan, I'll make this "Blazor I18n Text" provide IStringLocalizer<T>
service.
After completing these steps, static typing localization of data annotation validation error messages using "Blazor I18n Text" will come true.
Hi, all.
Today, I published the "Blazor Internationalization(I18n) Text - StringLocalizer support" package.
I'm sorry that this is still a "beta" release, and there are no documents about how to use this package, yet. And also, It will be buggy, I think.
However, "Blazor Internationalization(I18n) Text - StringLocalizer support" maybe can works with "LocalizedDataAnnotationsValidator" component to localize validation messages.
Due to there are not enough documents at this time, please reference the sample site source code bellow.
I hope may this new package be helpful for you!
Did you stop maintenance?
@Seanxwy No, I don't intend to stop maintaining this project for now. But in fact, I admit that the priority of this project was going down lower than other my OSS projects.
I've come across your
I18nText
project while looking for a solution which would allow me to translate Blazor validation messages defined usingErrorMessage = "..."
constants.I don't see how I could use
I18nText
to provide the messages.Do you have any ideas?
I've also opened an issue for the ASP.NET Core 3.0 documentation on this very same subject.