Symfony integration for PHP Translation
Via Composer
$ composer require php-translation/symfony-bundleclass AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Translation\Bundle\TranslationBundle(), } } }An example configuration looks like this:
// config.yml translation: locales: ["en", "sv"] symfony_profiler: enabled: true webui: enabled: true edit_in_place: enabled: true config_name: default # the first one or one of your configs activator: php_translation.edit_in_place.activator configs: app: dirs: ["%kernel.root_dir%/Resources/views", "%kernel.root_dir%/../src"] output_dir: "%kernel.root_dir%/Resources/translations" excluded_names: ["*TestCase.php", "*Test.php"] excluded_dirs: [cache, data, logs]// routing_dev.yml _translation_webui: resource: "@TranslationBundle/Resources/config/routing_webui.yml" prefix: /admin _translation_profiler: resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yml'// routing.yml _translation_edit_in_place: resource: '@TranslationBundle/Resources/config/routing_edit_in_place.yml' prefix: /adminRead the full documentation at http://php-translation.readthedocs.io.
