CMS Development

Luc_Benayoun
Membro

Change HubSpot automatic messages strings on membership pages

resolver

Hi 🙂 

 

I'm currently working for an Italian customer with a registration process on their website (using HubSpot of course).

 

I'm trying to change some messages languages but it seems there's something preventing me from doing it.

 

As you can see on the screenshot, the red part is in french for me (because I'm in France) but sometimes it's in English, sometimes in another language, and so on.

 

How can I force it to be always in italian? I already tried to force the html_lang value to "it" but it doesn't work.

 

Any help would be highly appreciated 🙂

 

Capture d’écran 2022-09-23 à 18.21.03.png

0 Avaliação positiva
1 Solução aceita
Anton
Solução
Especialista reconhecido(a)

Change HubSpot automatic messages strings on membership pages

resolver

Hi @Luc_Benayoun

is it a custom form? If so, you can modify the embed code with these options.

 

 

example:

 

default embed code:

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
  hbspt.forms.create({
    region: "na1",
    portalId: "xxxxxxx",
    formId: "xxxxxxxx",
    version: "V2_PRERELEASE"
  });
</script>

 

modified with translations:

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
  hbspt.forms.create({
    region: "na1",
    portalId: "xxxxxxxx",
    formId: "xxxxxxxx",
    version: "V2_PRERELEASE",
locale: 'en',
      translations: {
        en: {
          required: "Hey! That's required!",
          invalidDate: "Please enter a real date",
          submitText: "Custom Submit Button Text",
          submissionErrors:{ 
             MISSING_REQUIRED_FIELDS: "Please fill in all required fields!" 
          },
          fieldLabels: {
            email: "Electronic mail"
          }
        }
      }
  });
</script>

 

best, 

Anton

 

Anton Bujanowski Signature

Exibir solução no post original

0 Avaliação positiva
4 Respostas 4
Anton
Solução
Especialista reconhecido(a)

Change HubSpot automatic messages strings on membership pages

resolver

Hi @Luc_Benayoun

is it a custom form? If so, you can modify the embed code with these options.

 

 

example:

 

default embed code:

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
  hbspt.forms.create({
    region: "na1",
    portalId: "xxxxxxx",
    formId: "xxxxxxxx",
    version: "V2_PRERELEASE"
  });
</script>

 

modified with translations:

<script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script>
<script>
  hbspt.forms.create({
    region: "na1",
    portalId: "xxxxxxxx",
    formId: "xxxxxxxx",
    version: "V2_PRERELEASE",
locale: 'en',
      translations: {
        en: {
          required: "Hey! That's required!",
          invalidDate: "Please enter a real date",
          submitText: "Custom Submit Button Text",
          submissionErrors:{ 
             MISSING_REQUIRED_FIELDS: "Please fill in all required fields!" 
          },
          fieldLabels: {
            email: "Electronic mail"
          }
        }
      }
  });
</script>

 

best, 

Anton

 

Anton Bujanowski Signature
0 Avaliação positiva
Luc_Benayoun
Membro

Change HubSpot automatic messages strings on membership pages

resolver

Hello Anton 🙂 

 

No it's not a custom form, it's a HubSpot login form (I use the HubSpot membership login module) so I can't test the solution you're providing. Do you have any other idea?

 

Best, 

Luc

0 Avaliação positiva
Anton
Especialista reconhecido(a)

Change HubSpot automatic messages strings on membership pages

resolver

Hi @Luc_Benayoun

if performance isn't really a thing, you can always go the jQuery .replaceWith() or equivalent vanilla JavaScript route.

 

best, 

Anton

Anton Bujanowski Signature
0 Avaliação positiva
Jaycee_Lewis
Gerente da Comunidade
Gerente da Comunidade

Change HubSpot automatic messages strings on membership pages

resolver

Hey, @Luc_Benayoun 👋 Thanks for reaching out! Hey, @Jnix284 @Anton, do you have any tips for @Luc_Benayoun?

 

Best,

Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot