elmoulaoui/web-translator-bundle

使用网页管理翻译文件

dev-master 2013-09-02 12:15 UTC

This package is not auto-updated.

Last update: 2024-09-23 15:15:34 UTC


README

使用网页管理翻译文件

安装

  1. 将捆绑包添加到 composer.json 中

"require": { "elmoulaoui/web-translator-bundle": "dev-master" }

  1. php composer.phar update

  2. app/AppKernel.php, 启用捆绑包

$bundles = array( .... new Web\TranslatorBundle\WebTranslatorBundle(), .... );

  1. 在 app/config/parameters.yml 中添加捆绑包配置

    translator_bundles: e acme-demo-bundle: "%kernel.root_dir%/../src/Acme/DemoBundle" translator_main_language: fr translator_target_languages: [en] translator_target_domains: [messages, validators, AcmeDemoBundle] translator_format: xliff

  2. 在 app/config/routing.yml 中导入捆绑包路由

web_translator: resource: "@WebTranslatorBundle/Resources/config/routing.yml" prefix: /translator