You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 29, 2018. It is now read-only.
I hope this is the right place, I followed samples and comments posted here and I was able to quickly write a proof of concept on a custom FileStringLocalizerFactory and FileStringLocalizer and register them in services at startup and DI working great.
So far so good... The problem I am facing is that tag-helpers like asp-validation-for use data annotations info on the model which kind of works if you use resource based localization. I would like to use my own.
I see how regular localization providers (controllers and views) try to be modular and plugable, and it works, but I cannot see a way to plug my own Data Annotation Localization provider.
I other words, how can I make tag-helpers like asp-validation-for take data from a custom annotation provider I would write (file based).
I don't know enough about the insides of the architecture to make a call on what is the right way... I mentioned here a couple a couple of ideas since we are talking about localization. If indeed people think it is an ok thing to do, (which I dont know), then I can try to write something better in the MVC repo.
I do apologize if I dont do things completely right, I am very new to all this.
I appreciate your patience.
Hello,
I hope this is the right place, I followed samples and comments posted here and I was able to quickly write a proof of concept on a custom FileStringLocalizerFactory and FileStringLocalizer and register them in services at startup and DI working great.
So far so good... The problem I am facing is that tag-helpers like
asp-validation-for
use data annotations info on the model which kind of works if you use resource based localization. I would like to use my own.I see how regular localization providers (controllers and views) try to be modular and plugable, and it works, but I cannot see a way to plug my own Data Annotation Localization provider.
I other words, how can I make tag-helpers like
asp-validation-for
take data from a custom annotation provider I would write (file based).Here is the code in the model
So when validation fails, I would like to pull the string from my provider/file instead of a resource file.
Either that or extend
asp-validation-for
so it can use another provider. That would work for me too.TIA,
David
The text was updated successfully, but these errors were encountered: