Ok ... thanks ....
But I use a behaviour that validates the extension and return the
error message like
"The submitted file extension is not permitted, only jpeg,png,gif
permitted."
where the extension's type can change.
In my view I would use a code like:
__d('errors',$messageError)
because prior I don't know which is the error and which is the field
with error .
So for use variables inside localization I must change heavily the
behaviour and the view?
Is there a different solution to do this without to change anything?
Thanks
On 3 Set, 18:26, Miles J <[email protected]> wrote:
> Because your doing it wrong. Should be done like so:
>
> English version:
> en/errors.po
>
> msgid "fileExtRestricted"
> msgstr "The submitted file extension is not permitted, only %s
> permitted."
>
> Foreign versions:
> sp/errors.po
>
> msgid "fileExtRestricted"
> msgstr "L'estensione del file caricato non รจ permessa, solo %s sono
> permesse."
>
> All the msgids/slugs must be the same, all that changes is the msgstr.
>
> So once you have done that, in your view your would do:
>
> sprintf(__d('errors', 'fileExtRestricted', true), 'jpeg, gif, png');
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---