php-translation / symfony-bundle
Installs: 3 511 260
Dependents: 9
Suggesters: 0
Security: 0
Stars: 327
Watchers: 16
Forks: 94
Open Issues: 48
Type:symfony-bundle
Requires
- php: ^8.1
- nyholm/nsa: ^1.1
- php-translation/extractor: ^2.0
- php-translation/symfony-storage: ^2.1
- symfony/asset: ^5.3 || ^6.0 || ^7.0
- symfony/console: ^5.3 || ^6.0 || ^7.0
- symfony/finder: ^5.3 || ^6.0 || ^7.0
- symfony/framework-bundle: ^5.3 || ^6.0 || ^7.0
- symfony/intl: ^5.3 || ^6.0 || ^7.0
- symfony/translation: ^5.3 || ^6.0 || ^7.0
- symfony/twig-bundle: ^5.3 || ^6.0 || ^7.0
- symfony/validator: ^5.3 || ^6.0 || ^7.0
- twig/twig: ^2.14.4 || ^3.3
Requires (Dev)
- bamarni/composer-bin-plugin: ^1.3
- matthiasnoback/symfony-config-test: ^5.2
- matthiasnoback/symfony-dependency-injection-test: ^5.1
- nyholm/psr7: ^1.1
- nyholm/symfony-bundle-test: ^2.0
- php-http/curl-client: ^1.7 || ^2.0
- php-http/message: ^1.11
- php-http/message-factory: ^1.0.2
- php-translation/translator: ^1.0
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^9.6
- symfony/dependency-injection: ^5.3 || ^6.0 || ^7.0
- symfony/phpunit-bridge: ^5.2 || ^6.0 || ^7.0
- symfony/twig-bridge: ^5.3 || ^6.0 || ^7.0
- symfony/web-profiler-bundle: ^5.3 || ^6.0 || ^7.0
Suggests
- php-http/httplug-bundle: To easier configure your httplug clients.
This package is auto-updated.
Last update: 2024-10-23 11:42:43 UTC
README
Symfony integration for PHP Translation
Install
Install this bundle via Composer:
composer require php-translation/symfony-bundle
If you're using Symfony Flex - you're done! Symfony Flex will create default configuration for you, change it if needed. If you don't use Symfony Flex, you will need to do a few more simple steps.
- First, register the bundle:
# config/bundles.php return [ // ... Translation\Bundle\TranslationBundle::class => ['all' => true], ];
- Then, configure the bundle. An example configuration looks like this:
# config/packages/php_translation.yaml translation: locales: ["en"] edit_in_place: enabled: false config_name: app configs: app: dirs: ["%kernel.project_dir%/templates", "%kernel.project_dir%/src"] output_dir: "%kernel.project_dir%/translations" excluded_names: ["*TestCase.php", "*Test.php"] excluded_dirs: [cache, data, logs]
# config/packages/dev/php_translation.yaml translation: symfony_profiler: enabled: true webui: enabled: true
- And the last step, add new routes:
# config/routes/dev/php_translation.yaml _translation_webui: resource: '@TranslationBundle/Resources/config/routing_webui.yaml' prefix: /admin _translation_profiler: resource: '@TranslationBundle/Resources/config/routing_symfony_profiler.yaml'
# config/routes/php_translation.yaml _translation_edit_in_place: resource: '@TranslationBundle/Resources/config/routing_edit_in_place.yaml' prefix: /admin
Documentation
Read the full documentation at https://php-translation.readthedocs.io.