Created
February 16, 2012 14:48
-
-
Save umpirsky/1845379 to your computer and use it in GitHub Desktop.
Translate Validation Messages in Silex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app->register(new Silex\Provider\TranslationServiceProvider(), array( | |
'locale' => 'sr_Latn', | |
'translation.class_path' => __DIR__ . '/../vendor/symfony/src', | |
'translator.messages' => array() | |
)); | |
$app['translator']->addLoader('xlf', new Symfony\Component\Translation\Loader\XliffFileLoader()); | |
$app['translator']->addResource('xlf', __DIR__ . '/../vendor/symfony/src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.sr_Latn.xlf', 'sr_Latn', 'validators'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment