I have an application which I need to have work in more than one language. Can someone give me some pointers as to where I should start looking. For example can I decorate the fields in my models with different headings that could be used depending on the language in use?
My application also uses messages like this:
ModelState.AddModelError("username", "You must specify a username.");
How can I code these messages for different languages?
You can customize a
ModelMetadataProviderand aModelValidatorProviderjust as I’ve done in Griffin.MvcContrib.With my versions, this is all you need to get localization of models and validations working:
More info: http://blog.gauffin.org/2011/09/easy-model-and-validation-localization-in-asp-net-mvc3/
(nuget packages will be available as soon as I’ve got the administration area working with embedded views)