views:

100

answers:

0

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?