-
Author
-
January 14, 2014 at 09:58 #9681mpitkaParticipant
Hi!
How can I translate pmpro email-subjects?
I appreciate your help!
January 15, 2014 at 14:21 #9749AbeKeymasterThis is an example from their site that goes to your functions.php
COPY CODE/* Change email subjects. The function checks $email->template and updates the subject as needed. The email template name will be equivalent to the filenames in the /email/ folder of the PMPro plugin. */ function my_pmpro_email_subject($subject, $email) { //only checkout emails if($email->template == "checkout_free") { $subject = "Thank you, " . $email->data["name"] . ", for using " . get_bloginfo("name"); } return $subject; } add_filter("pmpro_email_subject", "my_pmpro_email_subject", 10, 2);
to translate the you need to wrap the strings inside a wordpress translation function. example with the “Thank you, ” above:
$subject = __(“Thank you, “, “kleo_framework”) . $email->data[“name”] . “, for using ” . get_bloginfo(“name”);
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 18, 2014 at 12:32 #9881mpitkaParticipanthmm…. i don’t really understand what you mean? Can you give a full example?
Thanks!
January 20, 2014 at 17:18 #9973AbeKeymasterWell the example is there but you need to add the translation function like this
COPY CODEfunction my_pmpro_email_subject($subject, $email) { //only checkout emails if($email->template == "checkout_free") { $subject = __("Thank you","kleo_framework"), " . $email->data["name"] . __(", for using ", "kleo_framework") . get_bloginfo("name"); } return $subject; } add_filter("pmpro_email_subject", "my_pmpro_email_subject", 10, 2);
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 23, 2014 at 20:55 #10135mpitkaParticipantIs there any way to translate every message at once, like: “information about your payment” etc.
January 27, 2014 at 13:20 #10282AbeKeymasterHi, I don’t think so that can be done
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.