Commit 6d3cc41b authored by Fabien Potencier's avatar Fabien Potencier

removed obsolete cookbook entry

parent 8bd96879
Translating Validation Messages
===============================
When working with Symfony validator, a common task would be to show localized
validation messages.
In order to do that, you will need to register translator and point to
translated resources::
$app->register(new Silex\Provider\TranslationServiceProvider(), array(
'locale' => 'sr_Latn',
'translator.domains' => array(),
));
$app->before(function () use ($app) {
$app['translator']->addLoader('xlf', new Symfony\Component\Translation\Loader\XliffFileLoader());
$app['translator']->addResource('xlf', __DIR__.'/vendor/symfony/validator/Symfony/Component/Validator/Resources/translations/validators/validators.sr_Latn.xlf', 'sr_Latn', 'validators');
});
And that's all you need to load translations from Symfony ``xlf`` files.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment