antfroger/dont-translate-bundle
最新稳定版本:v1.3.1
Composer 安装命令:
composer require antfroger/dont-translate-bundle
包简介
A bundle to disable the translation of your Symfony2 applications and only display the translation keys
README 文档
README
A bundle to disable the translation of your Symfony2 applications and only display the translation keys
Installation
1. Add the required package using composer.
composer require antfroger/dont-translate-bundle
2.Add the bundle to your AppKernel.
<?php // in %kernel.root_dir%/AppKernel.php $bundles[] = new Af\Bundle\DontTranslateBundle\AfDontTranslateBundle();
3. Optionally, define the configuration
- mode: the mode you want to use to enable the feature (get, cookie)
- param_name: the name of the parameter that you use to enable the feature
- roles: the user should at least have one of these roles to be able to enable the feature if no role is defined the user doesn't need to be logged in to be able to enable the feature
# app/config/config.ym af_dont_translate: mode: "get" param_name: "untrans" roles: ["ROLE_ADMIN", "ROLE_TRANSLATOR"]
Usage
To display your application without translation, add the GET parameter param_name to the URL
http://my-application.io/?untrans
or add a cookie param_name to only see the translation keys in your application
License
This library is under the MIT license. For the full copyright and license information, please view the LICENSE file that was distributed with this source code.
统计信息
- 总下载量: 30
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-12-26