You could build the variable into a __construct() function : $this->validate = .... __('must be alphanumeric') ....
On 15 avr, 18:04, gino pilotino <[EMAIL PROTECTED]> wrote: > Hello, > i was wondering... when setting custom messages in validation arrays > for Models > how can i use internationalization ? > > i.e. > > var $validate = array( > 'item' => > array( > 'rule' => 'alphaNumeric', > 'message' => 'must be alphanumeric' > ), > > i want the message to be translated eventually. > i cannot use __() because it's an in class initialization of a member > variable > ($validate) so it only accepts constant inizialization (a simple > string). > > I cannot either find documentation for the translate behaviour, > can somebody please post a link ? can it be useful in this case ? > > thanks in advance, > -d. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---