Integrate Weglot into HubSpot for website translation

We have integrated Weglot into a test site and the translation is very good. Unfortunately, the forms are not translated.
Does anyone have any ideas on how to solve this?
Can the Java script be integrated into a form module?

<script type=“text/javascript” src=“https://cdn.weglot.com/weglot.min.js”></script>
<script>
Weglot.initialise({
api_key: ‘wg_3bb03552c3d543e7d05d35529e861b6e1’
});
</script>
If I only insert the script into the js area of the module, it doesn’t work.

Or is there another possibility?
Thanks Andreas


@AFleischer wrote:

We have integrated Weglot into a test site and the translation is very good. Unfortunately, the forms are not translated.
Does anyone have any ideas on how to solve this?
Can the Java script be integrated into a form module?

<script type=“text/javascript” src=“https://cdn.weglot.com/weglot.min.js”></script>
<script>
Weglot.initialise({
api_key: ‘wg_3bb03552c3d543e7d05d35529e861b6e1’
});
</script>
If I only insert the script into the js area of the module, it doesn’t work.

Or is there another possibility?
Thanks Andreas


To integrate Weglot into HubSpot for website translation and ensure that forms are translated, you need to ensure the Weglot script is integrated globally into your website. First, add the Weglot script to the header of your site so that it loads on every page, including those with forms. You can do this by navigating to your HubSpot account, going to the “Settings” tab, and selecting “Website” > “Pages.” In the “Site Header HTML” section, insert the following code:
<script type=“text/javascript” src=“https://cdn.weglot.com/weglot.min.js”></script>
<script>
Weglot.initialize({
api_key: ‘wg_3bb03552c3d543e7d05d35529e861b6e1’
});
</script>
This ensures that the Weglot translation script is applied globally across your site. If forms are not being translated, you might need to apply additional customization. Ensure that the forms’ HTML elements are properly tagged for translation. You can manually adjust the form fields to include language tags or classes that Weglot can recognize.