Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

[#4274] Language translation strings in CBSubs Mailer

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
11 years 4 weeks ago - 11 years 3 weeks ago #234794 by boyjahq
We have LOTS of experience using the language translation strings in Community Builder and it's various plugins, including CBSubs. However, we are not having success with the Mailer plugin. It refuses to recognize language translation content and instead simply sends the string definitions. I have read the entire CBSubs manual and can find no reference to this. Is there some trick to getting automated Mailer messages to pick up defined string content?

We are using
CBSubs 3.0.0
CB 1.9
Joomla 2.5.14
We have 2 languages: en-GB and ja-JP
Last edit: 11 years 3 weeks ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 4 weeks ago #234798 by krileon
Replied by krileon on topic Language translation strings in CBSubs Mailer
It always sends the email in the language of whoever triggered the email. In the case of the mailer it's the system that sends the email so it'll always send in the sites default language (so probably English). We're working on a fix for this so it'll properly load the language of the user receiving the email instead of the one sending it.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
11 years 4 weeks ago #234802 by boyjahq
Replied by boyjahq on topic Language translation strings in CBSubs Mailer
I understand about that. But in this case it is not taking EITHER of the language definitions. It is only showing the string. As a test I did this in the en-gb language.php

"EXPIRING SOON" => "Membership expiring soon!",

And what I get is only EXPIRING SOON, which tells me that it is not looking at the language.php file at all. It is only showing whatever is typed in the input boxes on the mailer edit screen.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 3 weeks ago #234831 by krileon
Replied by krileon on topic Language translation strings in CBSubs Mailer
CBTxt uses 1 to 1 matching. So you'll need to click View Source or whatever the button is called for you WYSIWYG editor and ensure there is no surrounding tags or any other extract text that'd cause the match to fail. It does not do inline translations.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
11 years 3 weeks ago #234852 by boyjahq
Replied by boyjahq on topic Language translation strings in CBSubs Mailer
We have LOTS of experience using the language translation strings in Community Builder and it's various plugins, including CBSubs. Editor is always set to off. There is no extra text or other code causing the match to fail. The Mailer plugin simply does not work with language translations, despite what it says when you hover over the information icon on the mailer automation creation page.


Attachments:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48473
  • Thanks: 8281
  • Karma: 1443
11 years 3 weeks ago - 11 years 3 weeks ago #234878 by krileon
Replied by krileon on topic Language translation strings in CBSubs Mailer
Reviewed source and indeed looks like a bug. Please make the below changes and it should allow translations for subject and body to work fine.

IN: /components/com_comprofiler/plugin/user/plug_cbpaidsubscriptions/plugin/cbsubsmailer/cbsubs.mailer.php
ON: Line 769
FROM:
Code:
$emailbody = $cbUser->replaceUserVars( $emailbody, false, false, $extraStrings, false );
TO:
Code:
$emailbody = $cbUser->replaceUserVars( $emailbody, false, false, $extraStrings, true );
ON: Line 780
FROM:
Code:
$mq->emailsubject = trim( $cbUser->replaceUserVars( $this->emailsubject, false, false, $extraStrings, false ) );
TO:
Code:
$mq->emailsubject = trim( $cbUser->replaceUserVars( $this->emailsubject, false, false, $extraStrings, true ) );

#4274


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
Last edit: 11 years 3 weeks ago by krileon.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum