herrera-io/silex-translation-files
最新稳定版本:1.1.0
Composer 安装命令:
composer require herrera-io/silex-translation-files
包简介
A Silex service provider for using translation files.
关键字:
README 文档
README
This is a Silex service provider that extends the existing Translation service in order to more easily support the use of translation files. You can specify the loader, the files, and the locales all as a parameter.
Example
use Herrera\Silex\Provider\TranslationServiceProvider; use Silex\Application; $app = new Application(); $app->register( new TranslationServiceProvider(), array( 'translation.files' => array( 'Symfony\\Component\\Translation\\Loader\\YamlFileLoader' => array( '/path/to/file.de.yml' => 'de', '/path/to/file.en.yml' => 'en', '/path/to/file.fr.yml' => 'fr' ) ) ) ); $translated = $app['translator']->trans($key);
Installation
Use Composer:
$ composer.phar require "herrera-io/silex-translation-files=~1.0"
统计信息
- 总下载量: 4.58k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-08-15