PHPackages                             reliqarts/laravel-auto-translator - 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. reliqarts/laravel-auto-translator

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

reliqarts/laravel-auto-translator
=================================

Automatic translations for Laravel.

v1.1.0(1y ago)65981MITPHPPHP ^8.2CI passing

Since Oct 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/reliqarts/laravel-auto-translator)[ Packagist](https://packagist.org/packages/reliqarts/laravel-auto-translator)[ Docs](https://github.com/reliqarts/laravel-auto-translator)[ GitHub Sponsors](https://github.com/reliq)[ RSS](/packages/reliqarts-laravel-auto-translator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (11)Versions (7)Used By (0)

[![Laravel Auto-Translator](./docs/images/logo.svg)](./docs/images/logo.svg)

Laravel Automatic Translator, for Laravel 10+

[![test](https://github.com/reliqarts/laravel-auto-translator/actions/workflows/test.yml/badge.svg)](https://github.com/reliqarts/laravel-auto-translator/actions/workflows/test.yml)[![Codecov](https://camo.githubusercontent.com/efecd7a7ca10fd3d1b3a3e8530ea067c677e7d9f580a5e909b33b812eebcadbb/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f72656c6971617274732f6c61726176656c2d6175746f2d7472616e736c61746f722e737667)](https://codecov.io/gh/reliqarts/laravel-auto-translator)[![Latest Stable Version](https://camo.githubusercontent.com/3512c79aa5fa171e65ce28a289991accaa79ed41773bc7585dfdb052fefc6050/68747470733a2f2f706f7365722e707567782e6f72672f72656c6971617274732f6c61726176656c2d6175746f2d7472616e736c61746f722f76657273696f6e)](https://packagist.org/packages/reliqarts/laravel-auto-translator)[![License](https://camo.githubusercontent.com/dcb5a2c278389f6df3c33d5d8bd5de039026a70e67e5c951039b8e240c39d0c8/68747470733a2f2f706f7365722e707567782e6f72672f72656c6971617274732f6c61726176656c2d6175746f2d7472616e736c61746f722f6c6963656e7365)](https://packagist.org/packages/reliqarts/laravel-auto-translator)[![](https://camo.githubusercontent.com/908117774040308c4d578c1cd22994af4bf31188672fed0bc1e2ebc21d66026f/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64663563643264613838656431623531663663332f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/reliqarts/laravel-auto-translator/maintainability)

This package will scan your application, locate all [translation string keys](https://laravel.com/docs/10.x/localization#using-translation-strings-as-keys) throughout and generate translations based on your configuration.

Features
--------

[](#features)

- Simple, easy to schedule artisan command to generate all translations
- Automatic language file generation ([json](https://laravel.com/docs/10.x/localization#using-translation-strings-as-keys))
- Easy to configure, with support for custom translator implementation

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

[](#installation)

Install via composer:

```
composer require reliqarts/laravel-auto-translator
```

Configuration
-------------

[](#configuration)

You may publish the configuration file and customize as you wish. Each built-in translator implementation has its own set of config options. All configuration options are explained in the [configuration file](https://github.com/reliqarts/laravel-auto-translator/blob/main/config/config.php).

```
php artisan vendor:publish --provider="\ReliqArts\AutoTranslator\ServiceProvider"
```

### Translator

[](#translator)

The `auto_translate_via` key allows you to specify which translator should be used for automatic translations. By default, this is set to Google's simple translator. Any service implementing the `\ReliqArts\AutoTranslator\Contract\Translator` interface may be used here.

#### Built-in Implementations

[](#built-in-implementations)

ImplementationPaidDocumentationAvailable languages\\ReliqArts\\AutoTranslator\\Service\\Translator\\SimpleGoogleApiTranslatorNoN/A100+\\ReliqArts\\AutoTranslator\\Service\\Translator\\DeepLTranslatorYes[Docs](https://www.deepl.com/docs-api)30+Important

For production use cases please consider using a paid translator service. Do not depend on the free Google HTTP implementation shipped with this package as it may break at any time. See original disclaimer on [google-translate-php](https://github.com/Stichoza/google-translate-php).

Usage
-----

[](#usage)

### Artisan Command

[](#artisan-command)

The package provides an easy-to-use command which you may run on-demand or on a schedule.

```
php artisan auto-translator:translate
```

You may pass one or more language codes (comma separated) in order to specify which languages should be translated to. e.g.

```
php artisan auto-translator:translate es,de
```

An optional `replace-existing` flag (`r`) allows you to override existing translations. e.g.

```
php artisan auto-translator:translate es,de -r
```

### Language Switcher Endpoint and Middleware

[](#language-switcher-endpoint-and-middleware)

The package provides a route/middleware combination which allows users to switch the language of your application.

#### Usage:

[](#usage-1)

1. Add the `\ReliqArts\AutoTranslator\Http\Middleware\LanguageDetector` middleware to the web route group in your `App\Http\Kernel` class.
2. Switch the language by sending a post request to the `switch-language` route. *(name and endpoint changeable in config file)*You may use a select box, set of flags, etc. to make calls to this endpoint. UI choice is totally yours 😃

Credits &amp; Inspiration
-------------------------

[](#credits--inspiration)

This package was inspired by [laravel-auto-translate](https://github.com/ben182/laravel-auto-translate) and is made possible by the following:

- [laravel-translatable-string-exporter](https://github.com/kkomelin/laravel-translatable-string-exporter)by [kkomelin](https://github.com/kkomelin)
- [google-translate-php](https://github.com/Stichoza/google-translate-php) by [stichoza](https://github.com/Stichoza)
- [contributors](https://github.com/reliqarts/laravel-auto-translator/graphs/contributors)

---

All done! 🍻

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance45

Moderate activity, may be stable

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~104 days

Recently: every ~130 days

Total

6

Last Release

425d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b6fe8ddd9e024531dab6ec959ec29afc5cca84bb2129dc5405ff8f443bb19672?d=identicon)[Reliq](/maintainers/Reliq)

---

Top Contributors

[![reliq](https://avatars.githubusercontent.com/u/2624812?v=4)](https://github.com/reliq "reliq (8 commits)")[![rizkyseptiawan](https://avatars.githubusercontent.com/u/37582788?v=4)](https://github.com/rizkyseptiawan "rizkyseptiawan (1 commits)")

---

Tags

laravellocalelocalizationtranslatetranslationlanguagetranslationreliqartsauto-translator

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/reliqarts-laravel-auto-translator/health.svg)

```
[![Health](https://phpackages.com/badges/reliqarts-laravel-auto-translator/health.svg)](https://phpackages.com/packages/reliqarts-laravel-auto-translator)
```

###  Alternatives

[codezero/laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

543638.1k4](/packages/codezero-laravel-localized-routes)[kkomelin/laravel-translatable-string-exporter

Translatable String Exporter for Laravel

3291.4M10](/packages/kkomelin-laravel-translatable-string-exporter)[boxblinkracer/phpunuhi

Easy tool to work with translation files for validation, exports, imports and more.

83225.2k17](/packages/boxblinkracer-phpunuhi)[opgginc/codezero-laravel-localized-routes

A convenient way to set up, manage and use localized routes in a Laravel app.

2770.1k1](/packages/opgginc-codezero-laravel-localized-routes)[badinansoft/nova-language-switch

A Laravel Nova package to switch language in your application

26506.4k1](/packages/badinansoft-nova-language-switch)[longman/laravel-multilang

Package to integrate multi language (multi locale) functionality in Laravel 5.x

5514.4k1](/packages/longman-laravel-multilang)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
