Upload and download POEditor translations. Both PHP and JSON translation files are supported. Vendor PHP / JSON translations can also be uploaded / downloaded.
You can install the package via composer:
composer require wotz/laravel-poeditor-sync --devYou can publish the configuration file:
php artisan vendor:publish --provider="Wotz\PoeditorSync\PoeditorSyncServiceProvider"Set the POEditor API key and Project ID in your env-file:
POEDITOR_API_KEY=<your api key>
POEDITOR_PROJECT_ID=<your project id>
In the 'poeditor-sync' configuration file, you should specify the supported locales. You can also provide an associate array, if you want to map POEditor locales to internal locales.
// in config/poeditor-sync.php
// Provide array with all supported locales ...
'locales' => ['en', 'nl', 'fr'],
// ... Or provide associative array with POEditor locales mapped to internal locales
'locales' => ['en-gb' => 'en', 'nl-be' => 'nl'],
// ... Or you can map multiple internal locales to the same POEditor locale
'locales' => ['nl' => ['nl_BE', 'nl_NL']],All translations in all supported locales will be downloaded.
php artisan poeditor:downloadUpload translations of the default app locale:
php artisan poeditor:uploadUpload translations of specified locale:
php artisan poeditor:upload nlUpload translations and overwrite existing POEditor translations:
php artisan poeditor:upload --forceValidate that translations have the same replacements and correct pluralization:
php artisan poeditor:validateCheck if local translations match the ones on POEditor:
php artisan poeditor:statuscomposer testcomposer lintPlease see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.