CMS Development

Luc_Benayoun
Miembro

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 Me gusta
1 Soluciones aceptada
Anton
Solución
Experto reconocido | Partner nivel Diamond
Experto reconocido | Partner nivel Diamond

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

Ver la solución en mensaje original publicado

0 Me gusta
4 Respuestas 4
Anton
Solución
Experto reconocido | Partner nivel Diamond
Experto reconocido | Partner nivel Diamond

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 Me gusta
Luc_Benayoun
Miembro

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 Me gusta
Anton
Experto reconocido | Partner nivel Diamond
Experto reconocido | Partner nivel Diamond

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 Me gusta
Jaycee_Lewis
Administrador de la comunidad
Administrador de la comunidad

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