PHPackages                             syed-sohail9t5/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. syed-sohail9t5/laravel-auto-translate

AbandonedLibrary

syed-sohail9t5/laravel-auto-translate
=====================================

Automatically translate your language files using Google Translate

00PHP

Since Nov 11Pushed 3y agoCompare

[ Source](https://github.com/SyedSohail9t5/laravel-auto-translate)[ Packagist](https://packagist.org/packages/syed-sohail9t5/laravel-auto-translate)[ RSS](/packages/syed-sohail9t5-laravel-auto-translate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)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/Sohail9t5/laravel-auto-translate/releases)[![Build Status](https://camo.githubusercontent.com/8c01aa130a16fabf6a8e313719f4f274c7c401b4/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f62656e3138322f6c61726176656c2d6175746f2d7472616e736c6174652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Sohail9t5/laravel-auto-translate)[![Quality Score](https://camo.githubusercontent.com/a2132ab348aaaeae4e0cfee432965a86b8d6b7af/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f62656e3138322f6c61726176656c2d6175746f2d7472616e736c6174652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/Sohail9t5/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 7 or higher and needs PHP 7.2 or higher.

You can install the package via composer:

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

Config
------

[](#config)

After installation publish the config file:

```
php artisan vendor:publish --provider="Sohail9t5\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 HTTPYesSohail9t5\\AutoTranslate\\Translators\\SimpleGoogleTranslator/Over 100Google Cloud TranslateNoSohail9t5\\AutoTranslate\\Translators\\GoogleCloudTranslator[Documentation](https://cloud.google.com/translate/)Over 100Deepl API v2NoSohail9t5\\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:

```
