Recommended place for pre-translated Zend Framework resources
Posted
by Exception e
on Stack Overflow
See other posts from Stack Overflow
or by Exception e
Published on 2010-05-22T11:06:51Z
Indexed on
2010/05/22
11:10 UTC
Read the original article
Hit count: 184
Since zf 1.10 Zend Framework ships with pre-translated validation messages. They are outside the library path.
The manual illustrates how to load these in your bootstrap.
$translator = new Zend_Translate(
'array',
'/resources/languages',
$language,
array('scan' => Zend_Locale::LOCALE_DIRECTORY)
);
Zend_Validate_Abstract::setDefaultTranslator($translator);
I am inclined to think that these resources are specific to the zf-version; validators could change over time. If i copy the resources to my application tree I need to perform additional maintenance each time I upgrade to a newer version.
What is best practice? Is there a ZF convention already?
© Stack Overflow or respective owner