Currently, isEmpty errors throw:
Value is required and can't be empty
I'm loading my translator up like this:
[translation]
adapter = array
content.english["emailNotUnique"] = "Your user already exists"
content.english["Value is required and can't be empty"] = "You must specify your ID"
locale = en
The config above produces a valid array according to zend translate spec, so:
$this -> form -> setTranslator(new Zend_Translate($this -> getConfig() -> translation));
expected result is that isEmpty errors should now show up as
You must specify your ID
However I'm getting no love. No errors and no translation. I'm on Zend 1.11.1 and PHP5.3.5.
I think that the problem is with english
key in your ini file. Specifically it should not be there, because what you are actually passing to Zend_Translate as a content
is:
'content' => array(
'english' => array(
"emailNotUnique" => 'Your user already exists' ,
"Value is required and can't be empty" => 'You must specify your ID'
)
);
And it should be:
'content' => array(
"emailNotUnique" => 'Your user already exists' ,
"Value is required and can't be empty" => 'You must specify your ID'
);
Hope this will help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With