2

I wanted to translate emails sent to users after signing up using different language than English. I know there is a way to translate the system emails from the account settings translate tab, so I added the translations as you can see in this picture.

Account setting translate tab!

This didn't work. Maybe this is not enough. I tested it (registering a new account using Arabic) and it is not working: The system emails are still sent in English.

Does Drupal send emails according to user's preferred language? If yes, how can Drupal send registration email in a language that is not English?

4

Here is the steps to get user email in your language (describing all the steps in case you missed any)

Default installation of Drupal 8

Enable translation module (core modules)

  • Configuration Translation
  • Content Translation
  • Interface Translation
  • Language

add your language visiting

/admin/config/regional/language in my example added Greek with Language code el

translate emails visiting

admin/config/people/accounts/translate and pressing edit on your language which in my example would be take me to this page admin/config/people/accounts/translate/el/edit

add language switcher block (optional)

so you can switch to appropriate language

visit registration form for your language

in my case /el/user/register and fill out the form

The email should come in the registration language

It came in Greek in my test.

  • I had a custom registration form which always goes to /user/register. that's where the problem was. Thanks!! – Bassem Mohamed Feb 1 '18 at 10:36
0

On the user account, there is an option to choose Site Language. This account's preferred language for emails and site presentation. This is also assumed to be the primary language of this account's profile information. Based on the chosen language email for that user will send.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.