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

ActiveLibrary

alessiodh/deepltranslator
=========================

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

v1.0.3(4y ago)1213.8k↓30.3%12[4 issues](https://github.com/Alessio-dh/deepltranslator/issues)[1 PRs](https://github.com/Alessio-dh/deepltranslator/pulls)proprietaryPHP

Since May 23Pushed 3y ago2 watchersCompare

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

READMEChangelog (3)Dependencies (2)Versions (5)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 alessiodh/deepltranslator`

Publishing the config file

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

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

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 Alessiodh\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

33

—

LowBetter than 75% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 68.4% 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 ~9 days

Total

4

Last Release

1794d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d3a62f0de23c6323e8af2ff5a4f0b33cb37edae2e999f9ad40335b0ca7cd863?d=identicon)[Alessiodh](/maintainers/Alessiodh)

---

Top Contributors

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

---

Tags

composerdeepldeepl-apilaraveltranslations

### Embed Badge

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

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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