i wouldnt copy it exactly 1:1
translations should never be just "Minimum length of 8 characters"
then you'd need the same text for all other 999 different
character lenghts
better to use sprintf(__(text, true), var1, var2, ..) with %s etc
On 27 Dez., 10:47, Walther wrote:
> Check here:http
Check here: http://book.cakephp.org/view/133/Multiple-Rules-per-Field
(at the bottom) for the recommended method of doing it.
On Dec 26, 10:55 am, si-mon wrote:
> Thanks John. Thanks Euromark. Really helpful...
>
> On Dec 25, 9:55 pm, John Andersen wrote:
>
> > I can't agree, as I prefer to have
Thanks John. Thanks Euromark. Really helpful...
On Dec 25, 9:55 pm, John Andersen wrote:
> I can't agree, as I prefer to have the model be concerned with model
> things (data, retrieval, saving, validation, etc.), and the view
> concerned with presenting the data and the related error messages,
>
I can't agree, as I prefer to have the model be concerned with model
things (data, retrieval, saving, validation, etc.), and the view
concerned with presenting the data and the related error messages,
including the localization!
Usually I only have one form in which data for a specific model is
en
i dont like the form-way
it is quite redundant - if you add a new rule you might forget
one or two views which would not be helpful
having it all together in the model is in my opinion a cleaner
approach :)
On 25 Dez., 12:32, John Andersen wrote:
> Use the form helpers option for the input fiel
Use the form helpers option for the input fields! Look at:
http://book.cakephp.org/view/198/options-error
Thus you localize in the view - example:
echo $form->input(
'email',
array(
'label' => __('e-mail address',true),
'error' => array('users_email_rule' => __
('users_email_rul
put this in your app_model.php
/**
* Overrides the Core invalidate function from the Model class
* with the addition to use internationalization (I18n and L10n)
* @param string $field Name of the table column
* @param mixed $value The message or value w
Hi All,
Is there a way to use localization for validation messages in the
Model $validate array?
eg: $validate = array ( 'name' => array('rule'=>'notEmpty',
'message'=>'Name is mandatory' ));
I need the message 'Name is mandatory' in five different languages.
In other words: How can we use func