terra-symfony/trans-manager

Translate panel for symfony

dev-master 2020-04-26 21:44 UTC

This package is auto-updated.

Last update: 2024-03-27 06:46:30 UTC


README

Latest Version Build Status Code Coverage Quality Score SensioLabsInsight Total Downloads

Symfony integration for PHP Translation

Install

Install this bundle via Composer:

$ composer require terra-symfony/trans-manager

If you're using [Symfony Flex][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.

  1. First, register the bundle:
# config/bundles.php
return [
    // ...
    Terra\TransManagerBundle\TransManagerBundle::class => ['all' => true],
];
# config/packages/trans_manager_translation.yaml
translation_manager:
    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/trans_manager.yaml
trans_manager:
    site_key: 'APP_RECAPTCHA_SITE_KEY'
    secret: 'APP_RECAPTCHA_SECRET'