How to Change JQuery Validator Language Message
The best method is to extend the plugin like this when needed
$.extend($.validator.messages, {
required: "my required message",
....
});
If you look into the directory "localization", you could find different .js files that cointains error messages in different languages. [something like "messages_XX.js"]
Choose the file of the language you need and just add the following line, into the tag , after the inclusion of the jquery.validate.js
<script type="text/javascript" src="localization/messages_XX.js"></script>
Do it like this:
$(document).ready(function() {
$("form#login").validate({
lang: 'en' // or whatever language option you have.
});
});
If the language you wish to supply is not one of the default languages, then do this:
$.tools.validator.localize("fi", {
'*' : 'Virheellinen arvo',
':email' : 'Virheellinen sähköpostiosoite',
':number' : 'Arvon on oltava numeerinen',
':url' : 'Virheellinen URL',
'[max]' : 'Arvon on oltava pienempi, kuin $1',
'[min]' : 'Arvon on oltava suurempi, kuin $1',
'[required]' : 'Kentän arvo on annettava'
});
$("form#login").validate({
lang: 'fi'
});
See these instructions for more.