
Localizing the validator
Terveisiä äidille! Junassa on hauska matkustaa. Kokoomus haisee. Some random finnish. Here is the mandatory localization example.
JavaScript coding
We use $.tools.validator.localize method to supply a different language for all build-in validators. Look for localization documentation for the details.
// supply the language
$.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'
});
// use the finnish language in the validator
$("#myform").validator({ lang: 'fi' });