Dear Sir,
I'm working with Zend2 beta5 and experience trouble with translations.
I first tested the translate() method at the view level and it works
perfectly with PoEdit.
I just set this in my module.config.php and everything goes fines :
'translator' => array(
'locale' => 'fr_FR',
'translation_patterns' => array(
array(
'type' => 'gettext',
'base_dir' => __DIR__ . '/../language',
'pattern' => '%s.mo',
),
),
),
Now i want to translate std error messages from validators but couldn't
find a way to activate the use of translation files for them. As far as i
can understand, translate helper method is only for views.
Same problem if i want to translate error messages generated by home made
check in the controller....
Same problem to translate the form fields labels. I would like to translate
them in the form file using something like the translate() method but i
couldn't find any acceptable way to do it.
I can only get rid of
echo $this->formLabel($form->get('xxxx'))
in the view and replace them by
$this->translate('xxx')
but in that case i somehow lose the definition done in the form...
Could you be kind enough to tell me where i could find some
information/examples on this topic? I'm a bit disappointed because the
beginning of the translation process was pretty easy to implement (the view
part)... maybe i missed something...
--
Frédéric FERRI