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.
-- 
View this message in context: 
http://www.nabble.com/Zend_Form-and-validation-language-tp15248574s16154p15439264.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to