Rules supports the translation of text in rules actions. The attached patch makes the body and subject fields for private messages translatable.

On multiliangual sites, users can then receive messages that are sent via rules in their own language, if the message texts are translated by an administrator.

The patch applies to both 1.x and 2.x.

privatemsg_rules_translatable.patch878 bytesFrando
PASSED: [[SimpleTest]]: [MySQL] 4,881 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


Status: Needs review » Needs work

The last submitted patch, privatemsg_rules_translatable.patch, failed testing.

ptmkenny’s picture

Category: task » feature
ptmkenny’s picture

Marked as duplicate

ptmkenny’s picture

Status: Needs work » Needs review
ptmkenny’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm this works for me and allows the subjects and bodies of messages to be translated. I no longer need to write multiple rules and add language conditions per language, which is a great time-saver. Thanks!

Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x-1.x and 7.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

shi99’s picture

Issue summary: View changes

Hello. I noticed that I can translate the message subject and body, but the English message is always sent no matter what the active language is.

Is there another way to implement it so I can send a language specific message based on the user's or active language?

Thanks for you help.

kopeboy’s picture

Title: When sending a message via rules, make body and subject text translatable » HOW TO: When sending a message via rules, make body and subject text translatable
Category: Feature request » Support request
Status: Closed (fixed) » Active

How to make this?
I don't see any configurable translation when editing the Rule.. should I create some variables?

Some documentation needed pls.

kopeboy’s picture

Category: Support request » Bug report


@Berdir , you marked this has fixed but it isn't.

I can translate the rule with i18n rules, so I can set the translation for subject and body, but the message will be always sent in english!