Open haeberle opened 5 years ago
@haeberle & @damienbod: I just stumbled upon this issue because I faced a similar one (using Localization.SqlLocalizer 3.1.0). For me, it was not possible to set the 'ResourceType' on the DisplayAttribute. It has always resulted in an 'InvalidOperationException' (as also described here).
There are two options to overcome this challenge:
services.AddMvc()
.AddDataAnnotationsLocalization(options => {
options.DataAnnotationLocalizerProvider = (type, factory) =>
factory.Create(typeof(SharedResource));
});
Hope this reply helps anyone who faces similar issues in the future.
Best regards, Patrick
First, cool work, very helpful!
But I'm struggling a bit to localize the MVC ViewModel, because I'd like to have the Fields in the database too:
How I have to e to configure it ? Thanks a lot