L10N Laravel is a simple package that fetches translations from L10N localization app
- PHP version 7.0 or higher
- Laravel version 6.0 or higher
To install with Composer, simply require the latest version of this package.
composer require ornio/l10n-laravel
First add your unique l10n application token to your .env file:
L10N_TOKEN
Optionally you can add L10N_URL if it is different than default one:
L10N_URL
Publish files:
php artisan vendor:publish --tag="l10n"
Add your languages to l10n config file:
'languages' => [
'en', 'nb',
]
Finally run the command that fetches translations and saves them to default language directory:
php artisan l10n:fetch-translations