-
Fabien Potencier authored
Usage: $app = new Application(); $app->register(new TranslationExtension(), array( 'translation.class_path' => '...', )); $app['translator.messages'] = array( 'en' => array( 'apple' => 'apple', ), 'fr' => array( 'apple' => 'pomme', ), ); $app['locale'] = 'fr'; echo $app['translator']->trans('apple'); If you use the Symfony Bridge extension, some tags and filters are also automatically available in templates: $templates = array( 'index' => '{% trans %}apple{% endtrans %}' );
de9df3de
Name |
Last commit
|
Last update |
---|---|---|
src/Silex | ||
tests | ||
vendor | ||
.gitignore | ||
.gitmodules | ||
LICENSE | ||
README.md | ||
autoload.php | ||
compile | ||
example.htaccess | ||
phpunit.xml.dist |