devitek/yaml-translation
最新稳定版本:4.1.0
Composer 安装命令:
composer require devitek/yaml-translation
包简介
Add YAML file support to Laravel TranslationServiceProvider
README 文档
README
This package uses Symfony/Yaml parser.
Installing
Add "devitek/yaml-translation": "4.*" to your composer.json by running :
composer require devitek/yaml-translation
And select version: 4.*
Finally, publish all vendor assets to create a yaml-translation.php:
php artisan vendor:publish
Add support in Laravel
You have to replace
'Illuminate\Translation\TranslationServiceProvider',
with
'Devitek\Core\Translation\TranslationServiceProvider',
in app/config/app.php.
How to use
Just use regular php files or use yml or yaml files instead.
PHP :
<?php return [ 'hello' => 'Hello :name', 'author' => 'Devitek', ];
Will be equivalent to :
YAML
hello: Hello :name author: Devitek
Enjoy it ! Feel free to fork :) !
统计信息
- 总下载量: 44.87k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 33
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-05-01