chaibi / gtranslator
Google Translation for Laravel
Requires
- php: >=5.5.9
- illuminate/console: ~5.0
- illuminate/support: 5.0.x|5.1.x|5.2.x|5.3.x|5.4.x|5.5.x
This package is auto-updated.
Last update: 2024-03-10 00:43:59 UTC
README
#gTranslator
##Installation
Run the command below to install via Composer
composer require chaibi/gtranslator
Then add this line to your providers in config/app.php :
Chaibi\gTranslator\ServiceProvider::class,
And finally :
php artisan translate
You will be prompted to choose the source language (Default: app.locale config value) then you will be prompted again to enter the destination language (Default: app.fallback_locale config value), and that's it !
gTranslator will create a new folder with the destination language, and copy the source files to be translated there but with new translated values.
gTranslator detects :params and don't translate them. For example : "Welcome to :site !" with :site = home will give you in french "Bienvenue à home".
If you have extra directories where you have translations, different than resources/lang folder, please run
php artisan vendor:publish
and add your directories paths in the gTranslator newly created config file.
Please feel free to share with me your thoughts and suggestions.