承接 php-translation/symfony-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

php-translation/symfony-bundle

最新稳定版本:0.16.1

Composer 安装命令:

composer require php-translation/symfony-bundle

包简介

README 文档

README

Latest Version Total Downloads CI Static code analysis

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.

  1. First, register the bundle:
# config/bundles.php
return [
    // ...
    Translation\Bundle\TranslationBundle::class => ['all' => true],
];
  1. 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
  1. 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.

统计信息

  • 总下载量: 3.99M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 327
  • 点击次数: 1
  • 依赖项目数: 10
  • 推荐数: 0

GitHub 信息

  • Stars: 325
  • Watchers: 15
  • Forks: 93
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-03