how can localize name
in display
attribute? example:
[display(name = "library name")] public string libraryname { get; set; }
what should attribute?
asp.net core 1.0 not support out-of-the-box localization based on new introduced localization approach display
attribute. 1 way go use prior asp.net core 1.0 approach localization resource files. have implemented simple demo project shows how localize display attribute here https://github.com/feradz/aspnetcorelocalization/wiki dataannotations.resx
used localizing display
attribute.
in approach display name cannot contain special characters , spaces. example display name cannot library name
can libraryname
[display(name="libraryname", resourcetype = typeof(resources.dataannotations))] public string libraryname { get; set; }
Comments
Post a Comment