PHPackages                             flemzord/laravel-auto-translate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Localization &amp; i18n](/categories/localization)
4. /
5. flemzord/laravel-auto-translate

ActiveLibrary[Localization &amp; i18n](/categories/localization)

flemzord/laravel-auto-translate
===============================

Automatically translate your language files using Google Translate

0.8.1(5y ago)001MITPHPPHP ^7.3

Since Feb 14Pushed 5y agoCompare

[ Source](https://github.com/flemzord/laravel-auto-translate)[ Packagist](https://packagist.org/packages/flemzord/laravel-auto-translate)[ Docs](https://github.com/flemzord/laravel-auto-translate)[ RSS](/packages/flemzord-laravel-auto-translate/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (9)Versions (11)Used By (0)

######  [![](https://camo.githubusercontent.com/88774dcbc7fd1fc74fb287e5712042a0d25a58adda7a76227e1f2b1f3012cd72/68747470733a2f2f692e6962622e636f2f356868635053482f646566696c652d64652d6d6f64652d312e706e67)](https://camo.githubusercontent.com/88774dcbc7fd1fc74fb287e5712042a0d25a58adda7a76227e1f2b1f3012cd72/68747470733a2f2f692e6962622e636f2f356868635053482f646566696c652d64652d6d6f64652d312e706e67)

[](#----)

[![Latest Version](https://camo.githubusercontent.com/7aeaaffdab372bb7f1a7bc771400d9e18295916b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62656e3138322f6c61726176656c2d6175746f2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://github.com/Flemzord/laravel-auto-translate/releases)[![Build Status](https://camo.githubusercontent.com/8c01aa130a16fabf6a8e313719f4f274c7c401b4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f62656e3138322f6c61726176656c2d6175746f2d7472616e736c6174652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Flemzord/laravel-auto-translate)[![Quality Score](https://camo.githubusercontent.com/a2132ab348aaaeae4e0cfee432965a86b8d6b7af/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f62656e3138322f6c61726176656c2d6175746f2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Flemzord/laravel-auto-translate)

With this package you can translate your language files using a translator service. The package ships with a free Google Translate version, Google Translate API and Deepl.

Specify a source language and a target language and it will automatically translate your files. This is useful if you want to prototype something quickly or just a first idea of the translation for later editing. The package ships with two artisan commands. One for translating all the missing translations that are set in the source language but not in the target language. The other one for translating all source language files and overwriting everything in the target language.

Installation
------------

[](#installation)

This package can be used in Laravel 5.6 or higher and needs PHP 7.2 or higher.

You can install the package via composer:

```
composer require Flemzord/laravel-auto-translate
```

Config
------

[](#config)

After installation publish the config file:

```
php artisan vendor:publish --provider="Flemzord\AutoTranslate\AutoTranslateServiceProvider"
```

You can specify your source language, the target language(s), the translator and the path to your language files in there.

Translators
-----------

[](#translators)

NameFreeFileDocumentationAvailable languagesGoogle Translate HTTPYesFlemzord\\AutoTranslate\\Translators\\SimpleGoogleTranslator/Over 100Google Cloud TranslateNoFlemzord\\AutoTranslate\\Translators\\GoogleCloudTranslator[Documentation](https://cloud.google.com/translate/)Over 100Deepl API v2NoFlemzord\\AutoTranslate\\Translators\\DeeplTranslator[Documentation](https://www.deepl.com/docs-api.html)EN, DE, FR, ES, PT, IT, NL, PL, RUIf you have lots of translations to make I recommend Google Cloud Translate or Deepl. They are fast, reliable and you will not encounter any rate limiting.

Usage
-----

[](#usage)

### Missing translations

[](#missing-translations)

Simply call the artisan missing command for translating all the translations that are set in your source language, but not in your target language:

```
php artisan autotrans:missing
```

E.g. you have English set as your source language. The source language has translations in auth.php:

```
