bakle/translator

Translate lang files to any defined languages with just a command.

2.1.0 2021-12-27 04:10 UTC

This package is auto-updated.

Last update: 2024-10-27 10:33:50 UTC


README

Total Downloads Tests Passing

Anurag's GitHub stats

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