Install

Works with Drupal: ^10.2 || ^11 || ^12

Using Composer to manage Drupal site dependencies

Alternative installation files

Download tar.gz 17.6 KB
MD5: cf0231b6c5bd60c0b90c74c721659b65
SHA-1: fecf05cf247a55a38aa849b640621bb678f8ee5c
SHA-256: 08dabb4c0171f5ec420bb09e2d631c012d0d3c6290bc87a6330233cc6f5abf52
Download zip 26.36 KB
MD5: 4b1249fbbe571c491e1a5bae9327b431
SHA-1: 78b3c9d14d9f1ab66f8fff3bb2178dc9c8e87656
SHA-256: 0a9a05150397321ac9cbd1d0ac5b653952db5ef15857fcb10ac0a5840fde8e25

Release notes

DeepL Provider 1.0.0-beta1 is the first beta and is feature complete for 1.0. It adds model type selection, glossary support and HTML tag handling, declares Drupal 12 compatibility, and now throws the AI module's exceptions when DeepL fails. No new features are planned before 1.0.0, so from here the focus is on testing and fixing bugs. Please try it and report back (see "Testing").

New features

  • Model type (#3562179: Add support for model_type): choose the DeepL model type in the settings form: quality optimized, latency optimized or prefer quality optimized. Quality optimized is the default.
  • Glossary support (#3549076: Use glossary feature): set a DeepL glossary ID in the settings form. The glossary is applied only when the source language is known and the glossary has entries for the language pair, otherwise it is skipped. A glossary ID can also be given per request through the provider configuration (glossary_id), in which case it is sent as is without the language pair check. Lookups use DeepL's multilingual glossaries and are cached for the duration of a PHP process. If a lookup fails for a reason other than the glossary not existing, a warning is logged and the text is translated without the glossary.
  • HTML tag handling (#3632340: Enable tag_handling when translating formatted text): text containing markup is now sent with tag_handling: html (version v2), so tags are no longer billed as text or altered. Plain text is unchanged. A caller can set its own tag_handling value, or FALSE to turn it off, for instance to get attributes such as title translated. HTML attributes are not translated while tag handling is on.
  • Drupal 12 (#3594721: Automated Drupal 12 compatibility fixes for ai_provider_deepl 1.0.x-dev): the module now declares compatibility with Drupal 12 (^10.2 || ^11 || ^12). Its dependencies, AI and Key, may not support Drupal 12 yet, so check their releases before installing on Drupal 12.

Changes that may need your attention

  • Errors are now thrown (#3542165: Improve error handling for failed translation API requests): when DeepL fails, translateText() throws the AI module's exceptions (AiQuotaException, AiRateLimitException, AiSetupFailureException, AiResponseErrorException) instead of returning an empty result with the error message. Custom code that relied on the old behaviour needs to catch these.
  • Request options (#3632349: translateText() forwards the request tags to DeepL as translation options): the $options argument of translateText() is no longer forwarded to DeepL, as it carries the request tags. DeepL options are now taken from the provider configuration, set per request with setConfiguration() or by a PreGenerateResponseEvent subscriber.
  • Library requirement: deeplcom/deepl6. Run composer update drupal/ai_provider_deepl--with-dependencies.

Upgrading

There is no update hook. Existing sites should save the DeepL settings form or import the module's configuration to add the new model_type and glossary_id settings. Until then the defaults above apply.

Testing

Testing on real sites is what gets this to a stable release. Please try the beta, especially if you use any of the following, and report what you find
in the issue queue:

  • translating formatted (HTML) text, with and without tag handling;
  • glossaries, including language pairs the glossary does not cover and a missing source language;
  • the model types;
  • how your own code handles the thrown AI exceptions;
  • Drupal 12, which the module declares compatible with but has so far only been checked statically, and whose dependencies may not support it yet.

Automated tests

Unit tests for the glossary logic and kernel tests for tag handling and the configuration schema.

Credits

Thanks to everyone who contributed code, review and testing: Ilia Nozadze, myriam_b, Renato Heeb, wouters_f, mach3.zone, hartsak, jhuhta.

Created by: jhuhta
Created on: 23 Oct 2026 at 07:38 UTC
Last updated: 23 Oct 2026 at 07:42 UTC
Bug fixes
New features

Other releases