Forums

Translation of email to user

jj135 17 Jul, 2017
I tried using a localisation string in an email body, like: {l:RF_ACTIVATIONMAIL_USER}

But the string is not translated when the mail is end, Should this be possible or is it not possible to user the localisation strings in an email body text?

Some related questions:
Can we use HTML in a translation string. like:
RF_ACTIVATIONMAIL_USER=<p>Hello!</p>

And can we use form data in the localisation files like:
RF_ACTIVATIONMAIL_USER=<p>Hello {data:namel}!</p>

Kind regards,
Jip
jj135 17 Jul, 2017
Or can we use PHP include in the body textarea to include an email template? And can this html template contain the chronoforms field data?

Just trying to figure out the beste way to send localized emails on our custom user registration form in CF6... It should contain some form code and also the activation link.
jj135 17 Jul, 2017
Mmm, I also tried to include a file usong PHP as suggested here:
https://www.chronoengine.com/faqs/52-cfv4/cfv4-emails/2669-how-can-i-translate-emails.html

But that does not seem to work. Should PHP work in the template body? Or shoul I try a differnet approach?
Max_admin 20 Jul, 2017
Hi Jip,

The email body should apply the translations, and you can use HTML in the locale string but this is not a recommended approach.

There is no way to call a shortcode in the locale string but its on the todo list now.

Does the locale shortcode work when you use it in a message action before the email or not ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jj135 21 Jul, 2017
OK, thanks so far. How about a way to make 4 different emails for 4 languages? Maybe we could use a 'switch' based on the Joomla language tag to determine what email to send? Would that work? And how?

Maybe an other approach would be to use AcyMailing to send the emails. Again there would need to be some kind of switch (or just PHP code) to determine the language of the current user, then send a link (cULR?) to Acymaling to trigger a specific language email. But We also would need to send the activation link to Acymailing... Not sure if that can be done with an URL parameter to AcyMailing?

Or... I could write my own simple PHP mailer to send the mail. Also using an URL. Can I pass the activation code / link with a URL?

Kind regards,
Jip
Max_admin 30 Jul, 2017
Hi Jip,

Did you manage to solve this ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jj135 30 Jul, 2017
Hi Max, yes I did. I used the language tag to determine the language of the user. Based on that i triggered a specific Acymailing newsletter to be send. I created a newsletter for every language. I manage to send all the needed data to Acymailing including de activation link.

Thanks for your help an suggestions!

Kind regards,
Jip
Max_admin 31 Jul, 2017
Answer
Hi Jip,

Good, but you could also use a switch event with 4 events, and inside each of them a "custom code" action containing the email content, and the "return" setting enabled, then add this to the email body:

{var:custom_code1_name}{var:custom_code2_name}{var:custom_code3_name}{var:custom_code4_name}

One of them will succeed but the others will fail returning empty string.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jj135 31 Jul, 2017
OK, that sounds like a good solution as well! I will stick with my AcyMailing option for now. Because we can do some more nice formatting on those newsletters. But I will surely keep this in mind for an next form!

This switch event is getting more and more interesting ;-)
Max_admin 31 Jul, 2017
Hi Jip,

Ok, did you notice that the email editor also has some helpful formatting buttons ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
jj135 31 Jul, 2017
Not sure what formatting buttons you mean... Can you tell me what buttons you mean?
Max_admin 31 Jul, 2017
If you are customizing the email body and enable the editor, you will have extra row of buttons to format the email content into sections, rows and columns and color them, you can use this to design a very nice email layout.

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.