Locale: The Laravel localization tool
Locale is the first localization platform specifically built for Laravel. Forget the old-fashioned email exchanges between teams and translators that always slow down project development, manage translations with our admin panel and smoothly synchronize the files with your project using our simple package commands.
Follow the details provided on Locale after creating a new project.
php artisan locale:setup
You only need to run this command once. It will upload your existing translations to Locale and prepare your local files to be synced in the future.
Your local files will be reformatted but won't change their content.
php artisan locale:sync
Run this command to upload any new translation keys to Locale and download updates on all your target languages.
If there's any conflict during the process, you'll receive a confirmation message.
Syncing your translation will update your local files with new translations for Locale and upload new translations to Locale.
To keep you informed and in control with everything, you will be prompted for a confirmation before the command is executed. To
force the command to run without a prompt, use the --force
flag:
php artisan locale:sync --force
By default, nothing is deleted from Locale. If you delete translation keys from your local code and sync, translations will still be available from Locale. This is useful if you are working with multiple branches or some big new features.
However, sometimes you really need to delete old and unused translation keys from Locale. To do that, use the --purge
flag:
php artisan locale:sync --purge
Warning All keys that are not present in the current local branch will be permanently deleted.
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.