Closed
Description
I follow the documentation for DataAnnotation Localizaztion
for the below snippet of code
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc()
.SetCompatibilityVersion(CompatibilityVersion.Version_2_2)
.AddViewLocalization(options => { options.ResourcesPath = "Globalization"; })
.AddDataAnnotationsLocalization(options => options.DataAnnotationLocalizerProvider = (type, factory) =>
{
return factory.Create(typeof(SharedResources));
});
}
When put the SharedResource in another library, it maintain the sub-path of the configuration of AddViewLocalization ,it dosn't work until i remove ResourcePath for AddViewLocalization or put the SharedResource and its corresponding class on a folder named Globalization.
I think that the options of AddViewLocalization must be for AddViewLocalization and not affect AddDataAnnotationsLocalization options