Maybe this will help :

http://groups.google.com/group/cake-php/browse_thread/thread/fa32c81acc043eef/6a49c6d9fdc6f158?lnk=st&q=#6a49c6d9fdc6f158

On Jan 5, 6:09 pm, AG <[EMAIL PROTECTED]> wrote:
> It seems the routines for i18n and l10n don't work in the model file
> environment, if that makes any sense. Calling the function __()
> results in an error; is there a way around to load the necessary
> classes beforehand? does anyone know?
>
> Thanks
>
> Ldg27 wrote:
> > I am trying to implement  validation for my app, with this code:
>
> > var $validate = array(
> >                                            'name' => array(
> >                                            'rule_index' => array(
> >                                                    'rule' => 'alphanumeric',
> >                                                    'required' => true, 
> > 'allowEmpty' => false,
> >  line 11                                         'message' =>
> > __('validation.error.alphanumeric', true)
> >                                                    )
> >                                            )
> >                                    );
>
> > The 'message' => __('validation.error.alphanumeric', true) is to keep
> > error messages in 2 languages, but php throws this error:
>
> > Parse error: syntax error, unexpected '(', expecting ')' in /Users/
> > LDGC/Documents/Websites/TicoNight.com/facebook/ticonight/app/models/
> > party.php on line 11
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to