nasr / laravel-lang-translatable
Easy-to-use package To Automatically translate language directory using google translation
1.0.0
2023-10-14 18:56 UTC
Requires
- php: ^8.1
- brick/varexporter: ^0.4.0
- guzzlehttp/guzzle: ^7.5
- illuminate/support: >9
- stichoza/google-translate-php: ^5.1
Requires (Dev)
- laravel/framework: ^9.19
- mockery/mockery: ^1.4.4
- phpunit/phpunit: ^9.5.10
README
Introduction
Laravel Lang Translatable is an easy-to-use package To Automatically translate language directory using google translation api.
Installation
composer require nasr/laravel-lang-translatable
Publish the package config file using the following command:
php artisan vendor:publish --provider="LLT\LaravelLangTranslatableServiceProvider"
Basic Usage
php artisan translate:file
This will ask you in the terminal what is the file name you want to translate in your into your supported locales in laravel-lang-translatable config file
For Example: auth.php
php artisan translate:file --all
Will translate your default language directory into your supported locales in laravel-lang-translatable config file
php artisan translate:file --all --path=Modules/YourModuleName/Lang
Will translate your default language directory of your custom directory into your supported locales in laravel-lang-translatable config file