Defining more types of site e-mails in modern Drupal 9 10

The short answer to the translation question is if you enable configuration translation generally, the welcome and other built-in transactional e-mails, which are stored as translatable configuration, you can translate these emails.

It does seem perhaps a bit disruptive, though all the changing config may be an attempt to minimize disruction.

I guess all sorts of config declaring itself not translatable once translation is enabled is an attempt to keep the status quo?


Anyway, how about adding our own e-mails to Drupal’s e-mails (and having translations work the same)?

This is all in service of this issue on the Find It platform:

Where we could presumably add it by doing a form alter on Drupal’s existing site e-mail settings:

Where we ended up putting it in Find It:

Where it could be done is as content, with Site Settings module or Config Pages module (despite their names both save settings technically as content, not configuration).

All of these approaches can give you e-mails that are translatable. The content approaches might be more flexible because you can configure which content entities should be translated; i think configuration is all or nothing.

System e-mails translation works like this:

To do it for our own custom ones, it seems we need to do more.

See also: 2021-04-05-comparing-configuration-page-modules.html