PHPackages                             arillo/silverstripe-deepl-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. arillo/silverstripe-deepl-translator

ActiveSilverstripe-vendormodule[Localization &amp; i18n](/categories/localization)

arillo/silverstripe-deepl-translator
====================================

Adds deepl translations to silverstripe CMS

2.0.1(2mo ago)31272[1 PRs](https://github.com/arillo-ch/silverstripe-deepl-translator/pulls)BSD-3-ClausePHP

Since Jun 11Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/arillo-ch/silverstripe-deepl-translator)[ Packagist](https://packagist.org/packages/arillo/silverstripe-deepl-translator)[ Docs](https://github.com/arillo-ch/silverstripe-deepl-translator)[ RSS](/packages/arillo-silverstripe-deepl-translator/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (26)Used By (0)

arillo/silverstripe-deepl-translator
====================================

[](#arillosilverstripe-deepl-translator)

Adds Deepl translation API to a Fluent translated SilverStripe CMS. For now it only adds UI-Elements to texty fields (TextField, TextareaField, HTMLEditorField) to translate their contents.

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

[](#installation)

```
composer require arillo/silverstripe-deepl-translator

```

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

[](#configuration)

Create a Deepl API key and add it to your `.env`:

```
DEEPL_APIKEY=""

```

If you are using the glossary feature, it is necessary, to set a unique name prefix in your `.env`. It will prevent old glossaries from deletion if their names do not start with that name prefix. This is handy if you are using the same API key in multiple instances (e.g. dev &amp; prod).

```
DEEPL_GLOSSARY_NAME_PREFIX="myky-dev"

```

Configure your DataObjects to display the Deepl translation handles.

**NOTE:** It is important, that this configurations happens **AFTER** fluent was added to these DataObjects. Otherwise the UI will not appear.

Let's assume you have the following fluent config, named `myfluentcms`:

```
---
Name: myfluentcms
After:
 - '#basei18n'
 - '#fluentcms'
 - '#fluentcms-pages'
---
SilverStripe\i18n\i18n:
  default_locale: de_CH

Arillo\Elements\ElementBase:
  extensions:
    - 'TractorCow\Fluent\Extension\FluentVersionedExtension'

```

Field-wise translator
---------------------

[](#field-wise-translator)

Apply the deepl config after `#myfluentcms`:

```
---
Name: mydeepl
After:
 - '#myfluentcms'
 - '#silverstripe-deepl-translator'
---
SilverStripe\CMS\Model\SiteTree:
  extensions:
    - Arillo\Deepl\FieldWiseTranslationExtension

Arillo\Elements\ElementBase:
  extensions:
    - Arillo\Deepl\FieldWiseTranslationExtension

```

Make URLSegmentFields translatable (CAUTION: is expirimental; JS implementation WIP):

```
Arillo\Deepl\FieldWiseTranslationExtension:
  deepl_fieldwise_translate_urlsegment_field: true

```

Alternate field value gathering for field-wise translator
---------------------------------------------------------

[](#alternate-field-value-gathering-for-field-wise-translator)

To preload current values for field-wise translations this module uses the following method `$record->{$fieldName}`. However, it is possible to specify an alternate data source by implementing a class method called `deeplFieldValueFromRecord` to overwrite the default behavior, e.g.:

```
    // in some DataObject class
    // ...

    public function deeplFieldValueFromRecord($fieldName)
    {
        switch ($fieldName) {
            case 'AOLink_Title':
                return $this->LinkObject()->Title;

            case 'AOLink_URL':
                return $this->LinkObject()->URL;

            default:
                return $this->{$fieldName};
        }
    }

```

Add translation features to selected fields only:
-------------------------------------------------

[](#add-translation-features-to-selected-fields-only)

Below you see an example configuration that will only add field-wiese translation features to `Title` and `Description` for that `App\Model\MyDataObject`.

```
App\Model\MyDataObject:
  extensions:
    - Arillo\Deepl\FieldWiseTranslationExtension
  deepl_fieldwise_included_fields:
    - Title
    - Description

```

DataObject-wise translator
--------------------------

[](#dataobject-wise-translator)

Automatically translates all translatable fields of a DataObject. Just add `Arillo\Deepl\DataObjectWiseTranslationExtension` to extensions of that DataObject class, e.g.:

```
---
Name: mydeepl
After:
 - '#myfluentcms'
 - '#silverstripe-deepl-translator'
---
SilverStripe\CMS\Model\SiteTree:
  extensions:
    - Arillo\Deepl\DataObjectWiseTranslationExtension

Arillo\Elements\ElementBase:
  extensions:
    - Arillo\Deepl\DataObjectWiseTranslationExtension

```

Optionally you can define relations that also will be translated. Make sure that the according DataObject also use soem Fluent extensions.

To configure the wanted relations just use the `deepl_dataobject_included_relations` configuration, e.g.:

```
Arillo\Elements\ElementBase:
  extensions:
    - Arillo\Deepl\DataObjectWiseTranslationExtension
  deepl_dataobject_included_relations:
    - Elements
    - LinkObject

```

Glossary
--------

[](#glossary)

If you want to use the glossary features of Deepl, you can manage your glossaries in SiteConfig.

There are two glossary modes available: **editor** (default) and **external**.

### Editor mode (default)

[](#editor-mode-default)

In editor mode, glossary entries are managed through an inline editor directly in SiteConfig. This lets you create and edit glossary entries within the CMS.

This is the default mode and requires no additional configuration.

You need to set a glossary name prefix in your `.env`, like so:

```
DEEPL_GLOSSARY_NAME_PREFIX="mysite-prod"

```

These prefixes are useful if you run your app in different environments, e.g.: `dev` or `live`.

As of this writing, keep in mind that the deepl glossary API does not allow for updates of glossaries. So updates are deletes and creates. The purging mechanism takes the name prefixes into account. E.g.: If your env is set to `mysite-prod` it will only delete glossaries where the name starts with that prefix. This should help to prevent unwanted glossary deletes.

### External mode

[](#external-mode)

In external mode, glossaries are managed externally (e.g. via the Deepl web interface or API). SiteConfig displays a GridField where you can select existing Deepl glossary IDs for each source/target language pair.

To enable external mode, add this to your configuration:

```
SilverStripe\SiteConfig\SiteConfig:
  glossary_mode: external
```

Glossary records are auto-created for each language pair based on your Fluent locales. You then select the appropriate Deepl glossary ID from a dropdown populated by the glossaries available in your Deepl account for that language pair.

Style Rules
-----------

[](#style-rules)

Deepl supports style rules that allow you to control the tone and style of translations per target language. Style rule records are automatically created for each target language based on your Fluent locales.

You can assign a style rule to each target language in SiteConfig under the "Deepl" tab. The available style rules are fetched from your Deepl account and shown in a dropdown per language.

CMS
---

[](#cms)

In CMS you have to add `USE_DEEPL` permission to non-admin groups.

Alternatives
------------

[](#alternatives)

If you want to use Google Translate consider to use: [bratiask/silverstripe-autotranslate](https://github.com/bratiask/silverstripe-autotranslate)

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance84

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 65% 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 ~49 days

Recently: every ~9 days

Total

21

Last Release

82d ago

Major Versions

0.0.15 → 1.x-dev2026-01-12

0.0.16 → 1.0.02026-01-12

1.0.0 → 2.0.02026-02-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/71205042f233fccd5882cdbd033b8de8f3062acbed2b19c5b16e07ccd4e2208e?d=identicon)[Arillo](/maintainers/Arillo)

---

Top Contributors

[![nicolas-cusan](https://avatars.githubusercontent.com/u/1353931?v=4)](https://github.com/nicolas-cusan "nicolas-cusan (13 commits)")[![bumbus](https://avatars.githubusercontent.com/u/1391103?v=4)](https://github.com/bumbus "bumbus (7 commits)")

---

Tags

translationsilverstripedeepl

### Embed Badge

![Health badge](/badges/arillo-silverstripe-deepl-translator/health.svg)

```
[![Health](https://phpackages.com/badges/arillo-silverstripe-deepl-translator/health.svg)](https://phpackages.com/packages/arillo-silverstripe-deepl-translator)
```

###  Alternatives

[boxblinkracer/phpunuhi

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

83225.2k17](/packages/boxblinkracer-phpunuhi)[tractorcow/silverstripe-fluent

Simple localisation for Silverstripe

92421.6k26](/packages/tractorcow-silverstripe-fluent)[om/potrans

Command line tool for translate Gettext with Google Translator API or DeepL API

10515.0k4](/packages/om-potrans)[johannschopplich/kirby-content-translator

DeepL &amp; AI-powered content translation for Kirby CMS

208.1k](/packages/johannschopplich-kirby-content-translator)

PHPackages © 2026

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