File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 66[ ![ Quality Score] ( https://img.shields.io/scrutinizer/g/php-translation/symfony-bundle.svg?style=flat-square )] ( https://scrutinizer-ci.com/g/php-translation/symfony-bundle )
77[ ![ Total Downloads] ( https://img.shields.io/packagist/dt/php-translation/symfony-bundle.svg?style=flat-square )] ( https://packagist.org/packages/php-translation/symfony-bundle )
88
9+ ** Symfony integration for PHP Translation**
10+
11+ ## Install
12+
13+ Via Composer
14+
15+ ``` bash
16+ $ composer require php-translation/symfony-bundle
17+ ```
18+
19+ ``` php
20+ class AppKernel extends Kernel
21+ {
22+ public function registerBundles()
23+ {
24+ $bundles = array(
25+ // ...
26+ new Translation\Bundle\TranslationBundle(),
27+ }
28+ }
29+ }
30+ ```
31+
32+ An example configuration looks like this:
33+
34+ ``` yaml
35+ // config.yml
36+ translation :
37+ locales : ["en", "sv"]
38+ symfony_profiler :
39+ enabled : true
40+ webui :
41+ enabled : true
42+ configs :
43+ app :
44+ dirs : ["%kernel.root_dir%/Resources/views", "%kernel.root_dir%/../src"]
45+ output_dir : " %kernel.root_dir%/Resources/translations"
46+ excluded_names : ["*TestCase.php", "*Test.php"]
47+ excluded_dirs : [cache, data, logs]
48+ ` ` `
49+
50+ ` ` ` yaml
51+ // routing_dev.yml
52+ _translation_webui :
53+ resource : " @TranslationBundle/Resources/config/routing_webui.yml"
54+ prefix : /admin
55+
56+ _translation_profiler :
57+ resource : ' @TranslationBundle/Resources/config/routing_symfony_profiler.yml'
58+ ` ` `
59+
60+ ## Documentation
61+
62+ Read the full documentation at [http://php-translation.readthedocs.io](http://php-translation.readthedocs.io/en/latest/).
63+
You can’t perform that action at this time.
0 commit comments