ASP.NET MVC unobtrusive jquery localization -


How do I localize error messages without specifying the DataAnnotations for the model? Like in the message "Region XX is required", I want to translate only "field-required" section with jQuery globalization , I [Required (ErrorMessageResourceName = "- --- ")] properties

Is it possible to achieve this? Any code samples, tutorial links will be appreciated.

You can try the following approach:

  [Displayed (Name = "first name", resource type = type (resource processing)) [required (error message) resource type = type (resource processing), error message sources = name = "error")] public string first name {get ; Set up;}  

Then you add the key to your resource file:

  translate the first name and example with the "first name" error - & Gt; "{0} field is required"  

This approach can then be applied to all of your properties.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -