backtheweb/laravel-linguo
最新稳定版本:1.0.6
Composer 安装命令:
composer require backtheweb/laravel-linguo
包简介
Laravel parse i18n
README 文档
README
Laravel i18n parser
Installation
Laravel Service Provider
Add the service provider and the face on config/app.php
'providers' => [
[...]
Backtheweb\Linguo\LinguoServiceProvider::class,
],
'aliases' => [
[...]
'Linguo' => Backtheweb\Linguo\LinguoFacade::class,
]
And publish the config:
php artisan vendor:publish --provider="Backtheweb\Linguo\LinguoServiceProvider" --tag=config
Setup
Edit config/linguo.php
return [
'headers' => [
'Project-Id-Version' => env('APP_NAME', 'linguo'),
'Language-Team' => 'TeamName <info@example.com>'
],
'paths' => [
base_path('resources/views'),
base_path('app/Http/Controllers'),
] ,
'target' => resource_path('lang'),
'domain' => 'default',
'domains' => [
'auth',
'pagination',
'passwords',
'validation',
], // ignore domains, filenames on langs folder such as pagination, passwords,...
'locales' => ['es_ES', 'en_US', 'it_IT', 'fr_FR', 'de_DE', 'pt_BR'],
];
Sources : Is where the parser will be looking for translation keys i18nPath: Is the path where are stored the translation files
Parse and generate translation files
Parse
php artisian linguo:scan // Create file
php artisian linguo:update // Create or update po files
php artisian linguo:compile // Convert po to json
统计信息
- 总下载量: 369
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-11-19