-- ALkyD <[EMAIL PROTECTED]> wrote
(on Tuesday, 12 February 2008, 10:18 AM -0800):
> 
> 
> Matthew Weier O'Phinney-3 wrote:
> > 
> > Can you clarify exactly what's happening? Are placeholders such as
> > %value% not getting substitutions, or are you expecting the substitution
> > to be translated?
> 
> For example, I'm using Zend_Translate to translate
> Zend_Validate_StringLength error messages in french :
> 
> $translate = new Zend_Translate('array', array(
>       Zend_Validate_StringLength::TOO_SHORT => "'%value%' doit avoir au 
> minimum
> %min% caractère(s)", 
>       Zend_Validate_StringLength::TOO_LONG    => "'%value%' doit avoir au 
> maximum
> %max% caractère(s)"
> ));
> 
> $form = new Zend_Form();
> $form->setTranslator($translate);
> ...
> $name = new Zend_Form_Element_Text('name');
> $name->addValidator(new Zend_Validate_StringLength(4, 10));
> 
> With 'abc' as value of $name, the displayed message will be (without
> translator) :  "'abc' is less than 4 characters long".
> With my translator, il will be : "'%value%' doit avoir au minimum %min%
> caractère(s)", without variable substitution.

I committed changes earlier today in response to another issue report
on the fw-mvc list that should correct this. Please pull from current
svn and test, please.

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to