When embedding the form I’d like to define the locale programmatically through Javascript and the “locale” option. The issue is that the fields of the form still load on the form Language defined under the “options” tab on Hubspot and only the Error Messages and Submit button change.
I would like to change the form fields “locale” dynamically but I can’t, only the error messages and submit button.
I even tried the “translations” attribute but also didn’t work.
hbspt.forms.create({
region: “na1”,
portalId: “”,
formId: “”,
target: ‘#contact-form-holder’,
locale: ‘fi’,
translations:{
fi:{}
}
});
Hi, @lazevedo
Thanks for reaching out. I have a few questions to help give the community more context:
Thanks for the additional information, it is helpful for the community.
Best,
Jaycee
Hi @Jaycee_Lewis , the form was created in Hubspot and embedded in our external website (code below). When I’m embedding I put the “lang” option equal to “fi” for Finish language, and as you can see from the pictures the only thing that changes are the button and error messages, the field labels stay the same, isn’t there any way of automatically translating them ? Do I need to use the “translations” option and provide a translation for each field ?
I’m not using Set as Raw HTML option, but I also tried with that and was same result.
hbspt.forms.create({
region: “na1”,
portalId: “7964828”,
formId: “3208194c-4bf1-45f1-823d-015c7979846b”,
target: ‘#contact-form-holder’,
locale:‘fi’
});