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.

CommentFileSizeAuthor
privatemsg_rules_translatable.patch878 bytesFrando
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

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 http://drupal.org/node/1510412 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

Hello?

@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!

sano’s picture

Well, the rule-triggered private message action does send language-dependent messages, but the language chosen is of the "sending actor" (the user who triggers the rule) not of the one to whom the message is addressed. This is - apparently - a problem.

ivnish’s picture

Status: Active » Closed (outdated)