PHPackages                             milkycode/deepltranslator - 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. milkycode/deepltranslator

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

milkycode/deepltranslator
=========================

Will translate all files inside a laravel project using the DeepL API and exports it to the requested language

1.1.1(9mo ago)053↓50%1proprietaryPHP

Since Jul 25Pushed 9mo agoCompare

[ Source](https://github.com/milkycode/deepltranslator)[ Packagist](https://packagist.org/packages/milkycode/deepltranslator)[ RSS](/packages/milkycode-deepltranslator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

DeepL Translator for laravel
============================

[](#deepl-translator-for-laravel)

Will translate all files inside a laravel project using the DeepL API and exports it to the requested language

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

[](#installation)

Installation can be done through composer

`composer require milkycode/deepltranslator`

Publishing the config file

`php artisan vendor:publish --provider="milkycode\Deepltranslator\DeeplTranslatorServiceProvider" --force`

Add API Key to .env file or in config/deepltranslator.php

`DEEPL_API_KEY=XXXXXXXXXXXXXXXXXXXXXXX`

Add API mode (pro or free) to .env file or in config/deepltranslator.php

`DEEPL_PRO_API=false|true`

Usage
-----

[](#usage)

### Command

[](#command)

`php artisan deepl:translate {from} {to} {--filename} {--json}`

OptionDescriptionRequiredfromThe from language where the translations will be taken fromYestoThe language you want to translate toYesfilenameIn case you want to translate a single file this option can be setNojsonIn case this flag is set , it will search for json translation files instead of PHPNoThe from language files will be retrieved inside `/lang/{from}/`

### Trait

[](#trait)

The trait can be used to translate a single string to multiple languages on-the-fly

### Limitations

[](#limitations)

- You can only have max 128kb per translate call including all parameters.
- In the DeepL free plan you can only translate a maximum of 500k characters per month.
- If you translate files, a maximum of 50 files per translate call, can be translated.

Examples
--------

[](#examples)

### Translating all files

[](#translating-all-files)

`php artisan deepl:translate en nl`

This command will translate all php files inside the `/lang/en` directory. If the map `nl` is not existing, it will create it and put all translations according to the files retrieved from the `from` language.

### Single file

[](#single-file)

`php artisan deepl:translate en nl --filename=auth.php`

This will do exactly the same as translating all files but instead will only take 1 file inconsideration.

### Trait usage

[](#trait-usage)

```
namespace App\Http\Controllers;

use milkycode\Deepltranslator\Traits\DeepltranslatorTrait;

class MyTestController extends Controller
{
    use DeepltranslatorTrait;

    public function home(){
        $translated = $this->translateString('This is a test', 'en', ['fr','nl','ru']);

        /*
            $translated = [
              "fr" => "Il s'agit d'un test",
              "nl" => "Dit is een test",
              "ru" => "Это тест"
            ];
        */
    }
}
```

Upcoming changes
----------------

[](#upcoming-changes)

Currently not all options that Laravel supports are supported inside this package. Following options will be added soon:

- Pluralization inside translation file
- Numeric if statements inside the translation
- Database translations
- JSON files as translation files instead of PHP

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance55

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 52% 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

3

Last Release

297d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/48858cd9cc239295de866ff8071c2fe36833a9d5606b0f153d7e08408c8f6d37?d=identicon)[crysix](/maintainers/crysix)

---

Top Contributors

[![Alessio-dh](https://avatars.githubusercontent.com/u/10885632?v=4)](https://github.com/Alessio-dh "Alessio-dh (13 commits)")[![crysix](https://avatars.githubusercontent.com/u/12525017?v=4)](https://github.com/crysix "crysix (6 commits)")[![lennardv2](https://avatars.githubusercontent.com/u/168357?v=4)](https://github.com/lennardv2 "lennardv2 (6 commits)")

---

Tags

deepldeepl-apilaraveltranslation

### Embed Badge

![Health badge](/badges/milkycode-deepltranslator/health.svg)

```
[![Health](https://phpackages.com/badges/milkycode-deepltranslator/health.svg)](https://phpackages.com/packages/milkycode-deepltranslator)
```

###  Alternatives

[vemcogroup/laravel-translation

Translation package for Laravel to scan for localisations and up/download to poeditor

135304.0k2](/packages/vemcogroup-laravel-translation)[mage-os/module-automatic-translation

Automatic AI content translation for Mage-OS.

277.1k](/packages/mage-os-module-automatic-translation)[acclaro/translations

Easily launch and manage multilingual Craft websites without having to copy/paste content or manually track updates.

1229.5k](/packages/acclaro-translations)

PHPackages © 2026

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