Hi Jörn,

yes I have had a look at the lozalization files. I have even create
one. What I would like to know is how the plugin manages these files,
as I don't know how to access them.

Does the plugin itself retrieve the proper localization file? I have
retrieve it by means of a localization plugin, but I don't know if I
am doing it the right way.
Does the plugin have any method to load any message of the proper
lozalization file? If not, how could I get the message.

For example,  insted of this:

messages: {
                        name: "Please enter your firstname",
                        surname: "Please enter your lastname",
                        usr: {
                                required: "Please enter a username",
                                minlength: "Your username must consist of at 
least 2 characters"
                        },
                        psswrd: {
                                required: "Please provide a password",
                                minlength: "Your password must be at least 5 
characters long"
                        },
                        check_password: {
                                required: "Please provide a password",
                                minlength: "Your password must be at least 5 
characters long",
                                equalTo: "Please enter the same password as 
above"
                        },
                        mail: "Please enter a valid email address",
                }

I would like to do this:

messages: {
                        name: required
                        surname: required,
                        usr: {
                                required: required,
                                minlength: minlength
                        },
                        psswrd: {
                                required: required,
                                minlength: minlength
                        },
                        check_password: {
                                required: required,
                                minlength: minlength,
                                equalTo: equalTo
                        },
                        mail: email,
                }

Where required, minlength, etc. are defined in the lozalization file,
but it does not work.

David

On 2 abr, 10:11, Jörn Zaefferer <joern.zaeffe...@googlemail.com>
wrote:
> See any of the localization files for 
> reference:http://jqueryjs.googlecode.com/svn/trunk/plugins/validate/localizatio...
>
> Jörn
>
> On Thu, Apr 2, 2009 at 8:01 AM, david.garc...@barcelonamedia.org
>
> <david.garc...@barcelonamedia.org> wrote:
>
> > Hello,
>
> > I am using jQuery validation plugin. I have read about the plugin in
> > your website as well as in jQuery plugins forums. I am using it and it
> > works perfectly. My doubt is how can I use the localize messages? I
> > don't know if the plugin has a method or a way to access the messages
> > or I have to get them manually, as these messages are inside:
>
> > jQuery.extend(jQuery.validator.messages, {...});
>
> > If I use, for example, the message in 'required' variable, it does not
> > work, as I try to get it by using simply 'required'. I suppose this is
> > because 'required' is inside the function jQuery.validator.messages.
>
> > that's why I ask you if the oplugin has a method itself to get these
> > messages.
>
> > Thanks,
>
> > David

Reply via email to