PHPackages                             oss-tools/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. oss-tools/laravel-auto-translate

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

oss-tools/laravel-auto-translate
================================

Automatically translate your language files using Google Translate

v2.1.1(10mo ago)22.0kMITPHPPHP ^8.2CI passing

Since Feb 14Pushed 10mo agoCompare

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

READMEChangelog (10)Dependencies (9)Versions (18)Used By (0)

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

[](#----)

[![Latest Version](https://camo.githubusercontent.com/0802d23c0132c4632644704b6ea74753e9b6d7963391c28f8c56f099f082e43b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6f73732d746f6f6c732f6c61726176656c2d6175746f2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://github.com/oss-tools/laravel-auto-translate/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![GitHub Workflow Status](https://camo.githubusercontent.com/f33f254904a8708fa2102a13a22718fea446088bd8148537651029ff3f4ecca9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f73732d746f6f6c732f6c61726176656c2d6175746f2d7472616e736c6174652f72756e2d74657374732e796d6c3f6c6162656c3d7465737473266272616e63683d6d6173746572)](https://camo.githubusercontent.com/f33f254904a8708fa2102a13a22718fea446088bd8148537651029ff3f4ecca9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6f73732d746f6f6c732f6c61726176656c2d6175746f2d7472616e736c6174652f72756e2d74657374732e796d6c3f6c6162656c3d7465737473266272616e63683d6d6173746572)[![Check & fix styling](https://github.com/oss-tools/laravel-auto-translate/workflows/Check%20&%20fix%20styling/badge.svg)](https://github.com/oss-tools/laravel-auto-translate/workflows/Check%20&%20fix%20styling/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/803a8eda9508e52648a1d30e6d181034b905ad2e2c6ba812e402c8154151ff5b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f73732d746f6f6c732f6c61726176656c2d6175746f2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oss-tools/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.

Note
----

[](#note)

This package is a detached fork of [ben182/laravel-auto-translate](https://github.com/ben182/laravel-auto-translate).

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 oss-tools/laravel-auto-translate
```

Config
------

[](#config)

After installation publish the config file:

```
php artisan vendor:publish --provider="OSSTools\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 HTTPYesOSSTools\\AutoTranslate\\Translators\\SimpleGoogleTranslator/Over 100Google Cloud TranslateNoOSSTools\\AutoTranslate\\Translators\\GoogleCloudTranslator[Documentation](https://cloud.google.com/translate/)Over 100Deepl API v2NoOSSTools\\AutoTranslate\\Translators\\DeeplTranslator[Documentation](https://www.deepl.com/docs-api.html)EN, DE, FR, ES, PT, IT, NL, PL, RULibreTranslateYesOSSTools\\AutoTranslate\\Translators\\LibreTranslateTranslator[Documentation](https://github.com/LibreTranslate/LibreTranslate)AR, EN, ZH, NL, FI, FR, DE, HI, HU, ID, GA, IT, JA, KO, PL, PT, RU, ES, SV, TR, UK, VIIf 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:

```
