PHPackages                             guave/deepl-bundle - 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. guave/deepl-bundle

ActiveContao-bundle

guave/deepl-bundle
==================

Adds support for deepl.com translation to Contao 5.0+ dca input fields

2.0.1(3mo ago)22.6k↓33.3%[2 issues](https://github.com/guavestudios/DeeplBundle/issues)ISCPHPPHP ^8.1

Since Mar 4Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/guavestudios/DeeplBundle)[ Packagist](https://packagist.org/packages/guave/deepl-bundle)[ Docs](https://www.guaveinteractive.ch)[ RSS](/packages/guave-deepl-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (12)Versions (28)Used By (0)

Deepl Bundle
============

[](#deepl-bundle)

Adds support for [deepl](https://deepl.com) translation API in DCA input fields.

Also supports [Multilingual Data Container](https://github.com/terminal42/contao-DC_Multilingual)

Requirements
------------

[](#requirements)

- Contao 5.0+
- PHP 8.1+

Install
-------

[](#install)

### Install Contao bundle

[](#install-contao-bundle)

```
composer require guave/deepl-bundle
```

### Add deepl API key to .env

[](#add-deepl-api-key-to-env)

```
DEEPL_API_KEY=''

```

### Install assets

[](#install-assets)

if you use `web` as the document root, pass it as an argument

```
php vendor/bin/contao-console assets:install
```

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

[](#configuration)

```
guave_deepl:
  enabled: true
  freeApi: true
  defaultLanguage: de
  tables:
    tl_content:
      fields:
        - title
        - text
      multiColumnFields:
        category_grid:
          fields:
            - title
            - text
```

Register Custom ActiveLanguageResolver
--------------------------------------

[](#register-custom-activelanguageresolver)

Register it with the tag `deepl.resolver`

```
# services.yml
services:
  # ...

  App\Resolver\ActiveLanguageByProductLanguageResolver:
    public: true
    tags:
      - { name: 'deepl.resolver', priority: 50 }
```

```
# src/Resolver/ActiveLanguageByProductLanguageResolver.php
