Download the PHP package boblarouche/traduction without Composer
On this page you can find all versions of the php package boblarouche/traduction. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download boblarouche/traduction
More information about boblarouche/traduction
Files in boblarouche/traduction
Package traduction
Short Description Traduction
License MIT
Homepage https://github.com/boblarouche/traduction
Informations about the package traduction
Laravel 8.0+ Translation Helper
This package copies Laravel translation entries of default language located in resources/lang/xx
to a new target language. By default, it adds missing target keys only, but it can also replace everything. Different outputs and a sort option are available.
Installation
You can install the package via composer:
This package uses your app's fallback_locale configured at config/app.php
as the default language.
Usage
Here are different examples with optional parameters:
Options
If no options are specify, the artisan command will prompt the user in terminal. Add target and output options to skip all prompts.
- Target language
--target=fr
[no default] - Output type:
--output=value
will copy default language text for each new entry of target language and--output=key
will use the keys as text. [value is default] - Replace all
--replace
will overwrite any existing translation in target language. Beware: This is Destructive! [false is default] - Sorting
--sort
will put all target keys in aphabetical order [false is default]
Changelog
Please see CHANGELOG for more information what has changed recently.
Future updates/TODO:
- Add auto-translation from external service output e.g. --output=google-translate.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.