APIs & Integrations

satel
Participant

Customize internationalization of key emailSuggestion

I am trying to customize error message for key "emailSuggestion"  =>

emailSuggestion: "Meinst Du {{ email }}?",

it should contains the corrected email address., instead I get {{ email }}. 

How can I use the email variable in the message?

 

Thanks,

Ines

0 Upvotes
5 Replies 5
WendyGoh
HubSpot Employee
HubSpot Employee

Customize internationalization of key emailSuggestion

Hey @satel,

 

Could you share more in details what are you customize error message? Do you mean you'd like to set a error personalized token on a marketing email? Do you have a screenshot/an example email that you can share with me? 

 

Additionally, what's the portal ID in question?

0 Upvotes
satel
Participant

Customize internationalization of key emailSuggestion

Hey @WendyGoh 

Thanks for your reply

platfrom Id 7051473
I attached 2 Screenshot, one without customizing emailSuggestion, and the other one with customizing emailSuggestion.
when I do not customize emailSuggestion, then it will appear a suggestion, how I should change the Email Address. So I looked into the console, (see third screenshot) and I saw that I could add {{email}} in order to get the suggested Email, instead it appears only {{email}}.
Hope you can help me,
thanks,
Ines Satel email_tag.pngNewsletter – There for You 6-2-2020 9-44-38 AM.pngNewsletter – There for You 6-2-2020 9-43-03 AM.png

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Customize internationalization of key emailSuggestion

Hey @satel,

 

To further clarifiy, are you using a HubSpot/Non-collected Form. If you're using a HubSpot form, are you sharing the HubSpot form externally? 

 

If so, how are you sharing this Form externally? Are you using the embed code or HubSpot Forms API?

 

Additionally,  I do not believe the emailSuggestion function is something that HubSpot support. That said, how are you implementing the emailSuggestion function? Could you share with me a sample code?

satel
Participant

Customize internationalization of key emailSuggestion

Hello @WendyGoh ,

Yes, I follow the instructions on this link

https://developers.hubspot.com/docs/methods/forms/advanced_form_options

 and here the embeded code we used on ower website

 

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/shell.js"></script>
<script>
hbspt.forms.create({
portalId: "xxxxx",
formId: "xxxx-xxxx-xxxxx-xxxx-xxxxx",
locale: 'de',
translations: {
de: {
required: "Bitte fülle dieses Feld aus.",
missingSelect: "Bitte wähle einen Eintrag in der Liste.",
missingRequiredFields: "Bitte fülle alle Pflichtfelder aus.",
invalidEmail: "Bitte gib eine gültige E-Mail-Adresse ein.",
emailSuggestion: "Meinst Du {{email}} ?",
submissionErrors: {
BLOCKED_EMAIL: "Bitte ändere Deine E-Mail-Adresse, um fortzufahren.",
DELETED: "Dieses Formular ist nicht mehr aktiv, bitte aktualisiere die Seite und versuche es erneut.",
MISSING_REQUIRED_FIELDS: "Bitte fülle alle Pflichtfelder aus.",
OUT_OF_DATE: "Dieses Formular ist nicht mehr aktuell, bitte aktualisiere die Seite und versuche es erneut.",
RECAPTCHA_VALIDATION_ERROR: "Das Captcha konnte nicht validiert werden. Bitte versuche es erneut.",
SERVER_ERROR: "Leider ist etwas ist schief gegangen. Das Formular wurde nicht eingesendet, bitte versuche es später erneut.",
SUBMISSION_NOT_ALLOWED: "Dieses Formular kann nicht eingesendet werden, bitte kontaktiere den Eigentümer der Website.",
}
}
}
});
</script>

 

Thanks,

Ines Satel

0 Upvotes
WendyGoh
HubSpot Employee
HubSpot Employee

Customize internationalization of key emailSuggestion

Hey @satel,

 

Thanks for sharing your embed code! 

 

One clarification point, how is your team populating the {{email}} value? Reading through your previous response, I'm assuming that currently there's no value set on {{email}}? If that's the case, I do not believe you'd need to add the {{email}} and this is because the translations function translate the following: 'Did you mean ?' but not including the email value. 

0 Upvotes