hexadog/laravel-translation-manager
最新稳定版本:v0.5.0
Composer 安装命令:
composer require hexadog/laravel-translation-manager
包简介
Laravel Translation management package
README 文档
README
Introduction
hexadog/laravel-translation-manager is a Laravel package to help you manage your application translation.
Installation
This package requires PHP 7.3 and Laravel 7.0 or higher.
To get started, install Translation Manager using Composer:
composer require hexadog/laravel-translation-manager
The package will automatically register its service provider.
To publish the config file to config/translation-manager.php run:
php artisan vendor:publish --provider="Hexadog\TranslationManager\Providers\PackageServiceProvider"
Usage
Translation Manager has many features to help you working with translation
Configuration
This is the default contents of the configuration:
<?php return [ // Directories to search in. 'directories' => [ 'app', 'resources', ], // File Extensions to search for. 'extensions' => [ 'php', 'js', ], // Translation function names. // If your function name contains $ escape it using \$ . 'functions' => [ '__', '_t', '@lang', ], // Indicates weather you need to sort the translations alphabetically // by original strings (keys). // It helps navigate a translation file and detect possible duplicates. 'sort-keys' => true, ];
Artisan Commands
This package provides some artisan commands in order to manage themes.
Find unused translation
Find all unused translation in your app
php artisan translation:unused
Find all unused translation in your app for specifig namespace
php artisan translation:unused --namespace=hexadog
Find all unused translation in your app for specifig language
php artisan translation:unused --lang=fr
Find all unused translation in your app for a specific language file
php artisan translation:unused --filename=buttons
This example will search unused translation only in file buttons.php for all languages in directories configured.
Find missing translation
Find all missing translation in your app
php artisan translation:missing
Find all missing translation in your app for specifig namespace
php artisan translation:missing --namespace=hexadog
Find all missing translation in your app for specifig language
php artisan translation:missing --lang=fr
License
Laravel Translation Manager is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 6.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-01-18