Hello Drupal enthusiasts! Welcome to 'Drupal & AI Adventures.' In this series, we explore the amazing world of Drupal modules powered by artificial intelligence. Our mission? We want to inspire and inform you. Let’s dive in together! Today, we’re giving an update on AI-powered translations.

Why this update?

The landscape is changing rapidly, and when it comes to translations, a lot has changed in recent months. I received more questions about this and thought, I’ll write it down briefly.

How do translations work in Drupal?

There's two major ways to do translations in Drupal:

  • Symmetric translation in Drupal means that content in different languages is updated simultaneously. When a content type, such as a node (e.g., a blog post), is modified in one language, its translation in other languages can be immediately synchronized. This often happens when you use modules like Entity Translation, where the base content is shared, and only the language-specific data varies. All language versions remain in sync within the same content structure.

  • Asymmetric translation means that each translation of the content is handled independently. In Drupal, for example, if you have a node written in English and you create a French version, the French version is not automatically updated if the English version is modified. This approach offers more flexibility, as translators have time to manually translate and edit content without changes in one language directly affecting the other.
    Modules like paragraphs_asymmetric_translation_widgets can help you with this.

In both cases, it depends on the chosen translation method and how the system is set up. Symmetric is more automatic and aligned, while assymetric is more independent and detached.

Why this explanation?

Because not all translation plugins support both ways of handling translations.

How does that work with AI?

Below is an update on which modules offer AI-powered translations.

ai_tmgmt

Ai translation management (ai_tmgmt)

If you use the tmgmt module, you used to be able to enable AI translations with tmgmt_openai.

Since this was heavily built on OpenAI, this functionality has been moved to the new ai_tmgmt module.

For advanced translation workflows and a future-proof way of working, this is definitely the way forward. The TMGMT module is already active on more than ten thousand websites and has been extensively tested. Thanks to the ai_tmgmt module we can soon use all ai translations here too.

Auto translation

The auto_translate module is very similar to the ai_translate module. There are just slightly fewer settings (at the moment), but it has more users. The interface is just as user-friendly (1 click to translate the full page).

Textfield translation screenshot

Textfield Translation (ai_translate_textfield)

With Textfield Translation, you have to click more as an editor. It's not one click to translate the entire page, but one click per field.

However, you have more control as an editor; you can see the original text above the translated text. The sense of "human in the loop" is a bit greater here, making it easier to review.

On the other hand, you do have to click significantly more with this module.

ai_translate module functionality

ai_translate

In the AI module, there is a submodule called ai_translate. In the ai_translate submodule, you can choose a different AI model and prompt for each language.

Some advantages of this module:

  • Supported and tested by the AI community (the prompt is really good).
  • Supports batch translations (to avoid timeouts).
  • Can handle synchronous and asynchronous translation of paragraphs (which is not a given).
  • We are working with Layout Builder (also sync and async).

This is a module to which we are also actively contributing.