This package converts all PHP translations from Laravel`s "lang" directory a single Excel file with dot-arrayed keys. Each file comes to a separate sheet.
You can install the package via composer:
composer require insnsk/laravel-translate-excel
You can publish the config file with:
php artisan vendor:publish --tag="laravel-translate-excel-config"
This is the contents of the published config file:
return [
// this is the default locale which will be used as reference
'main_locale' => 'en',
// what locations would you like to have in your file
'locales' => ['en','de','ru','ja']
];
Just invoke the artisan console command:
php artisan lang:convert
And get your generated file at 'storage/app/translations.xlsx' You can specify filename as a parameter:
php artisan lang:convert to my_filename.xlsx
After you translate the file in Excel you would probably need to get it back to your app. So put your translated file "my_filename.xlsx" into "storage/app" directory, then run:
php artisan lang:convert from my_filename.xlsx
PHP-translation files will be generated into "storage/lang" folder. Just copy them back to your app root.
Readme update & config publish
This package was made just for my needs, so it was not tested at all and the code is not perfect also. Use it at your own risk.
The MIT License (MIT). Please see License File for more information.