uselocale / locale-laravel
Manage translations with Locale and smoothly synchronize them with your project using our simple package commands.
Installs: 5 122
Dependents: 0
Suggesters: 0
Security: 0
Stars: 15
Watchers: 4
Forks: 3
Open Issues: 4
Requires
- php: ^7.4|^8.0
- ext-json: *
- guzzlehttp/guzzle: ^6.0|^7.0
- illuminate/contracts: ^7.0|^8.0|^9.0|^10.0
- illuminate/filesystem: ^7.0|^8.0|^9.0|^10.0
- spatie/laravel-package-tools: ^1.9
Requires (Dev)
- nunomaduro/collision: ^4.0|^5.0|^6.0
- nunomaduro/larastan: ^1.0.3|^2.0
- orchestra/testbench: ^5.0|^6.0|^7.0|^8.0
- pestphp/pest: ^1.0
- pestphp/pest-plugin-laravel: ^1.1
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
This package is auto-updated.
Last update: 2024-12-08 20:03:53 UTC
README
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.
Installation
Follow the details provided on Locale after creating a new project.
Available commands
Setup
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.
Sync
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.
Forcing Sync to run
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
Purge unused translations
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.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.