N
N
NORD752012-11-09 17:43:52
.NET
NORD75, 2012-11-09 17:43:52

Localizing ASP.NET MVC 4 DataAnnotations validation messages in a model?

There is a model in the MVC4 project:
How to support multiple languages ​​through resources and DataAnnotations?
I managed to create a strongly typed resource “RegisterWizardModelResource” and it seems to work, but only one resource is attached - respectively one language?

public class RegisterWizardModel <br>
  {<br>
    [Display(ResourceType = typeof(RegisterWizardModelResource), Name="ClientName")]<br>
    [Required (ErrorMessageResourceName="RequiredClientIdentifier", <br>
      ErrorMessageResourceType = typeof(RegisterWizardModelResource)<br>
      )]<br>
    public string clientIdentifier { get; set; }<br><br>
...<br>

PS Once upon a time, a resource provider for ASP.NET Forms wrote, but that was in 2008, really again?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pletinsky, 2012-11-10
@pletinsky

Detailed instructions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question