PHPackages                             javidalpe/laravel-localization-automation - 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. javidalpe/laravel-localization-automation

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

javidalpe/laravel-localization-automation
=========================================

Translate your Laravel localization files using third party services

1.0.5(8y ago)255MITPHP

Since Nov 6Pushed 8y ago2 watchersCompare

[ Source](https://github.com/javidalpe/laravel-localization-automation)[ Packagist](https://packagist.org/packages/javidalpe/laravel-localization-automation)[ RSS](/packages/javidalpe-laravel-localization-automation/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

Automatically translate your lang files
=======================================

[](#automatically-translate-your-lang-files)

This package translates your Laravel localization files automatically using a third party service. Currently only supports [DeepL](https://www.deepl.com).

> This package only works with 'Short Keys' approach

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

[](#installation)

You can install the package via composer:

```
composer require --dev javidalpe/laravel-localization-automation

```

If you're on Laravel 5.4 or earlier, you'll need to add the following to your config/app.php:

```
'providers' => [
    ...
    Javidalpe\LaravelLocalizationAutomation\LaravelLocalizationAutomationServiceProvider::class,
];
```

Usage
-----

[](#usage)

This command translates all your files in `/lang/{from}/` directory and create the new ones in `/lang/{to}/` directory.

```
php artisan localization:translate {from} {to} {--provider=deepl}

```

**Example using default provider:**

```
php artisan localization:translate es fr

```

**Example using custom provider:**

```
php artisan localization:translate es fr --provider=deepl

```

### Known issues

[](#known-issues)

The command will fail on:

1. Lemmas with HTML inside. ```
    \\Wrong
    'welcome.greetings' => 'Hey!',
    \\Good
    'welcome.greetings' => 'Hey!',
    ```
2. Lemmas with placeholders different from Laravel. ```
    \\Wrong
    'welcome.greetings' => 'Hey {{name}}!',
    \\Good
    'welcome.greetings' => 'Hey!',
    ```
3. URLs. Fix these URLs manually.

Supported Languages
-------------------

[](#supported-languages)

### Deeply

[](#deeply)

DeepL(y) supports these languages:

CodeLanguageDEGermanENEnglishFRFrenchESSpanishITItalianNLDutchPLPolishDeepL says they will [add more languages](https://www.heise.de/newsticker/meldung/Maschinelles-Uebersetzen-Deutsches-Start-up-DeepL-will-230-Sprachkombinationen-unterstuetzen-3836533.html)in the future, such as Chinese and Russian.

How it works
------------

[](#how-it-works)

1. Foreach file in `/lang/{from}/` directory.
2. Foreach lemma in file.
3. Split pluralization lemmas.
4. Replace each Laravel place-holder with temp string.
5. Translate the lemma using the provider.
6. Undo replacement.
7. Assembly all lemmas in new files at `/lang/{to}/` directory.

Contributing
------------

[](#contributing)

1. Fork it
2. Create your feature branch (git checkout -b my-new-translation-service)
3. Commit your changes (git commit -am 'Added translation service')
4. Push to the branch (git push origin my-new-translation-service)
5. Create new Pull Request

### Add a new translation service

[](#add-a-new-translation-service)

1. Create a new class inside `/src/TranslationServices`. Implements `TranslationServiceStrategy`.
2. Add this class to `TranslationServiceStrategyFactory`.
3. Update this `README.md file.

Credits
-------

[](#credits)

- DeepL GmbH:
- Chris Konnertz:

License
-------

[](#license)

The MIT License (MIT). Please see License File for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

6

Last Release

3108d ago

### Community

Maintainers

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

---

Top Contributors

[![javidalpe](https://avatars.githubusercontent.com/u/5345952?v=4)](https://github.com/javidalpe "javidalpe (11 commits)")

---

Tags

artisan-commanddeepllaravellocalizationtranslationlaravellocalizationlanglocalesdeepl

### Embed Badge

![Health badge](/badges/javidalpe-laravel-localization-automation/health.svg)

```
[![Health](https://phpackages.com/badges/javidalpe-laravel-localization-automation/health.svg)](https://phpackages.com/packages/javidalpe-laravel-localization-automation)
```

###  Alternatives

[laravel-lang/publisher

Localization publisher for your Laravel application

2167.7M24](/packages/laravel-lang-publisher)[herkod/laravel-tr

Laravel İçin Türkçe Çeviri Dosyaları

628.1k](/packages/herkod-laravel-tr)[zachleigh/laravel-lang-bundler

Create Laravel translations bundles.

2512.5k](/packages/zachleigh-laravel-lang-bundler)

PHPackages © 2026

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