bakle / translator
Translate lang files to any defined languages with just a command.
2.1.0
2021-12-27 04:10 UTC
Requires
- php: >=7.4
- ext-json: *
- guzzlehttp/guzzle: ^7.4
- laravel/framework: ^7.0|^8.0
- orchestra/testbench: ^6.23
- phpunit/phpunit: ^9.5
Requires (Dev)
This package is auto-updated.
Last update: 2024-10-27 10:33:50 UTC
README
Laravel Translator
This is a package to translate any lang file inside your lang folder.
Installation
composer require bakle/translator
Configuration
This translator works with Google Translator API. First you have to create you Google Translator API Key. https://cloud.google.com/translate
Create and set the TRANSLATOR_API_KEY
environment key in your .env.
How to Use It
Note: By default, the translator will set the source lang from your app locale.
Translate all your files to French
php artisan translate --target-lang=fr
Translate a specific file
php artisan translate en/validation.php --target-lang=fr