I have heard people mention using tokens to translate emails instead of using the "dynamic" email functionality. How do you utilize tokens to do this? I have not found any documentation / guides on this subject.
Solved! Go to Solution.
In a nutshell:
#set( $translatedText = {
"subjectLine" : {
"en-us" : "... something...",
"es-mx" : "... algo... "
},
"footerText" : {
"en-us" : "... something...",
"es-mx" : "... algo... "
}
} )
${translatedText["subjectLine"][$lead.PreferredLanguage]}
In a nutshell:
#set( $translatedText = {
"subjectLine" : {
"en-us" : "... something...",
"es-mx" : "... algo... "
},
"footerText" : {
"en-us" : "... something...",
"es-mx" : "... algo... "
}
} )
${translatedText["subjectLine"][$lead.PreferredLanguage]}
Hi Sanford, thanks for the detailed answer! This is very helpful.
Just so I understand, so the translation map gets stored in an email script token name something like {{my.translatedText}}, and then the outputs would be stored in separate email script tokens named something like {{my.subjectLine}} or {{my.footerText}}?
Or does the entirety of the script get stored in a single email script token? And if so, how is the correct token referred to in the email?
I apologize in advanced as I am VERY new to this. This is how I have it set up right now. I have a email script token named {{my.translatedText}} that looks like the following.
And then I have another email script token named {{my.subjectLine}} that looks like this...
And then I use refer to {{my.subjectLine}} within the emails subject line.
That's right!
You simply include both tokens in your email, with the translations map coming first.
Thanks Sanford!
Its currently not working for me, but I believe its probably a referencing issue within the email itself. When you say "include both tokens in your email, with the translations map coming first", can you give me an example of what that would look like in the subject line?
Currently I just have {{my.subjectLine}} by itself in the subject line. Where and how to I add the translation map reference?
Currently I just have {{my.subjectLine}} by itself in the subject line. Where and how to I add the translation map reference?
Right before it.
Like this?
{{my.translatedText:default=edit me}}{{my.subjectLine:default=edit me}}
It returns the content of the email script:
{{my.translatedText:default=edit me}}{{my.subjectLine:default=edit me}}
Almost, but not with the defaults, those do not work with Velocity tokens:
{{my.translatedText}}{{my.subjectLine}}
Make sure:
Worked!!! I just needed to check the Country field. This is awesome
Thanks so much for your help, Sanford!