Provide a more convenient way to translate texts that are contained in ECA configurations

Created on 6 June 2025, about 1 month ago

Problem/Motivation

We have many areas where ECA is rendering or producing some output to end users. For multi-language sites, often times the text to output needs to be somehow translated.

There are a couple of ways how to make texts in ECA translatable. Some of them I can currently think of:

  1. Use the "Translate" action
  2. Use "Render: Twig" and use the trans filter in there
  3. Use Parameters and put translated texts in there, either using Yaml or use its natively supported configuration translation

Option 1 and 2 only run through Interface translation, which requires sometimes an additional manual step to add missing interface translations, e.g. when shipping from test to production.

None of these options are ideally convenient and maybe we can find a better way.

Steps to reproduce

Proposed resolution

One way I could think of is that ECA provides a separate place for collecting and providing a "flat" interface to translate texts, such as the title of a link from a "Render: link" action.

I guess, what doesn't make that much sense, is trying to make the ECA config structure itself translatable. It could influence the logic and that would be outside the scope of translation.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

Miscellaneous

Created by

🇩🇪Germany mxh Offenburg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mxh
  • 🇩🇪Germany mxh Offenburg
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Here is, what I think, amazing news: following the work that went into the config schema for all of ECA, it is now possible to use Drupal's config translation without having to do anything else other than enabling that module. I've just tested this with the message action plugin: used that in a model with an English message text, went to config translation of that model, and found a field for that field. Translated that message into German and got it displayed always in the correct language.

    Maybe this is already sufficient? We do a lot of multi-lingual modeling and we could do everything we want with this. What's relevant that the schema defines the correct property types to make them translatable, e.g. label can be translated, string can't.

Production build 0.71.5 2024