How to adapt Country Token to Language in Marketo Emails? | Community
Skip to main content
Level 1
September 4, 2024
Question

How to adapt Country Token to Language in Marketo Emails?

  • September 4, 2024
  • 1 reply
  • 1363 views

Hello everyone,


I'm currently working on a project involving a toggle translator to translate our website into multiple languages. For example, when the website is translated into German, the Marketo form displays the "Country" field as "Land," and countries are shown in German (e.g., "Germany" becomes "Deutschland").


I need to capture the translated value, such as "Deutschland," in addition to the default value ("Germany") in Marketo. This is important for personalizing emails in German, so the country should be displayed as "Deutschland" when sending emails in German.


Has anyone encountered a similar situation or found a solution to ensure that the country token adapts to the language of the email?

Any help or suggestions would be greatly appreciated!

Thanks in advance!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
September 4, 2024

Put your translations in a Velocity object and look up in that object to get the localized name.

 

e.g.

#set( $translations = { "de-DE" : { "country" : { "label" : "Land", "values" : { "Germany" : "Deutschland", "USA" : "Amerika" } } }, "fr-FR" : { "country" : { "label" : "Pays", "values" : {} } } } )

 

David_Gallaghe2
Level 4
September 4, 2024

Never mind, just now realizing that this was localizing the confirmation email, not the originating form -- my bad. 

 

Original Reply

Hey @sanfordwhiteman, is a velocity object applicable outside of email script tokens? I've never considered using velocity on a Marketo LP or in combination with a Marketo form. I would have assumed that a custom JS would have been required.

SanfordWhiteman
Level 10
September 4, 2024

OP is referring to “personalizing emails“ so it’s the move here. On an LP you can use a Text {{my.token}} with JSON in the same way.