Re: How to adapt Country Token to Language in Marketo Emails?

NelsonMisael
Level 1

How to adapt Country Token to Language in Marketo Emails?

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!

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: How to adapt Country Token to Language in Marketo Emails?

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 5

Re: How to adapt Country Token to Language in Marketo Emails?

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 - Community Moderator

Re: How to adapt Country Token to Language in Marketo Emails?

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.