In a nutshell:
- You set up a common Velocity token with your translation map, let's call it $translatedText.. (Obvs. the linguistic part doesn't happen automatically!)
#set( $translatedText = {
"subjectLine" : {
"en-us" : "... something...",
"es-mx" : "... algo... "
},
"footerText" : {
"en-us" : "... something...",
"es-mx" : "... algo... "
}
} )
- You store the lead's preferred language in a lead field, let's call it $lead.PreferredLanguage.
- Tokens output the appropriate value from the map, like
${translatedText["subjectLine"][$lead.PreferredLanguage]}