Luis Alvarado Luis Alvarado - 1 year ago 101
jQuery Question

How to Change JQuery Validator Language Message

Am using the JQuery Validator from How can i make it so that the messages are custom and not in english.

Answer Source

Do it like this:

$(document).ready(function() {
    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'

    lang: 'fi'

See these instructions for more.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download