Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
privatemsg_rules_translatable.patch | 878 bytes | Frando | |
Comments
Comment #2
ptmkenny CreditAttribution: ptmkenny commentedComment #3
ptmkenny CreditAttribution: ptmkenny commentedMarked http://drupal.org/node/1510412 as duplicate
Comment #4
ptmkenny CreditAttribution: ptmkenny commentedprivatemsg_rules_translatable.patch queued for re-testing.
Comment #5
ptmkenny CreditAttribution: ptmkenny commentedI 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!
Comment #6
BerdirCommitted to 7.x-1.x and 7.x-2.x.
Comment #8
shi99 CreditAttribution: shi99 commentedHello. 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.
Comment #9
kopeboy CreditAttribution: kopeboy commentedHow to make this?
I don't see any configurable translation when editing the Rule.. should I create some variables?
Some documentation needed pls.
Comment #10
kopeboy CreditAttribution: kopeboy commentedHello?
@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!
Comment #11
sano CreditAttribution: sano commentedWell, 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.
Comment #12
ivnish CreditAttribution: ivnish commented