PHPackages                             baraja-core/deepl - 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. [API Development](/categories/api)
4. /
5. baraja-core/deepl

ActiveLibrary[API Development](/categories/api)

baraja-core/deepl
=================

Translate texts. Simply.

v2.0.1(3y ago)21.6kPHPPHP ^8.1

Since Jun 30Pushed 3y ago1 watchersCompare

[ Source](https://github.com/baraja-core/deepl)[ Packagist](https://packagist.org/packages/baraja-core/deepl)[ Docs](https://github.com/baraja-core/deepl)[ RSS](/packages/baraja-core-deepl/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (6)Dependencies (9)Versions (8)Used By (0)

Deepl in PHP
============

[](#deepl-in-php)

Translate texts. Simply.

A simple library without dependencies for automatic translation of your texts.

📦 Installation
--------------

[](#-installation)

It's best to use [Composer](https://getcomposer.org) for installation, and you can also find the package on [Packagist](https://packagist.org/packages/baraja-core/deepl) and [GitHub](https://github.com/baraja-core/deepl).

To install, simply use the command:

```
$ composer require baraja-core/deepl

```

You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.

How to use
----------

[](#how-to-use)

The library requires no dependencies. Simply create an instance, pass the API key and start translating:

```
$apiKey = '...';
$isFreeApiKey = true;
$deepl = new \Baraja\Deepl\Deepl($apiKey, $isFreeApiKey);

// Translate "Hello!" to DE
echo $deepl->translate('Hello!', DeeplLocale::DE);
```

The library is designed for maximum ease of use. At the same time, you can easily configure all the modules.

Supported languages
-------------------

[](#supported-languages)

You can always get the list of supported languages from the `DeeplLocale` enum:

```
echo 'Supported languages: ';
$enumValues = array_map(static fn(\UnitEnum $case): string => htmlspecialchars($case->value ?? $case->name), DeeplLocale::cases());
echo implode(', ', $enumValues);
```

For normal translation work, we recommend using the built-in enum cases directly:

```
$deepl->translate('Text', DeeplLocale::CS, DeeplLocale::EN);
```

The first language parameter specifies the target language of the translation, the second parameter specifies the source language. If you don't specify a language, it will be detected automatically.

Translation cache
-----------------

[](#translation-cache)

We know that translating the same requests over and over again can be very expensive for you, because the API is charged by real requests. Therefore, the library directly implements a native cache that stores translation results in a temporary storage.

The default cache implementation is the `FileResultCache` service, in which you can configure a custom disk path. The default storage for the cache is `sys_get_temp_dir() . '/deepl'`.

```
$cache = new \Depl\FileResultCache(__DIR__ . '/cache');
$apiKey = '...';
$deepl = new \Baraja\Deepl\Deepl($apiKey, false, $cache);
```

📄 License
---------

[](#-license)

`baraja-core/deepl` is licensed under the MIT license. See the [LICENSE](https://github.com/baraja-core/deepl/blob/master/LICENSE) file for more details.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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 ~91 days

Recently: every ~62 days

Total

6

Last Release

1363d ago

Major Versions

v1.0.3 → v2.0.02022-06-16

PHP version history (2 changes)v1.0.0PHP ^8.0

v2.0.0PHP ^8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3382204?v=4)[baraja](/maintainers/baraja)[@baraja](https://github.com/baraja)

---

Top Contributors

[![janbarasek](https://avatars.githubusercontent.com/u/4738758?v=4)](https://github.com/janbarasek "janbarasek (25 commits)")

---

Tags

apideepldepplgoogle-translatelanglocalepackagephptranslatetranslationtranslator

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/baraja-core-deepl/health.svg)

```
[![Health](https://phpackages.com/badges/baraja-core-deepl/health.svg)](https://phpackages.com/packages/baraja-core-deepl)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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