Skip to main content
Version: Next

DeepL

Setup​

Create or use an existing DeepL API Account, get necessary configuration values from it and apply it via configuration user interface or via configuration file as follows.

pimcore_translations_provider_interface:
deepl:
api_url: '<TRANSLATE>' # e.g. https://api-free.deepl.com/v2/translate
token: '<YOUR_API_TOKEN>'
glossary: 'on'
glossary_url: '<GLOSSARY_LANGUAGE_PAIRS_ENDPOINT>' # e.g. https://api-free.deepl.com/v2/glossaries

Glossary​

The adapter supports usage of glossary during translation process but there is no user interface to create glossary entries. To use glossaries, you have to create them directly via DeepL API so that they will be used during translation process. Details see DeepL Docs.

Tag handling​

Every request tells DeepL how to treat markup in the text via its tag_handling parameter. The bundle sends xml by default, which is kept for backward compatibility. WYSIWYG content is HTML, not well-formed XML — tables (especially pasted from Word/Excel), &nbsp; and other named entities, or <br> without a closing slash can make DeepL drop or garble the markup in xml mode. If you translate WYSIWYG fields, switch to html:

pimcore_translations_provider_interface:
deepl:
tag_handling: 'html' # 'xml' (default) or 'html'

This option is only available via the Symfony configuration, not in the settings user interface.

Configuration of available languages in DeepL​

The bundle ships with a default list of DeepL languages (as of this bundle release). To override, set only the languages you need:

pimcore_translations_provider_interface:
deepl:
language:
source: ['EN', 'DE', 'FR']
target: ['DE', 'FR', 'EN-GB', 'EN-US']