So you need to translate your forms, depending on a user. We get it. Although at this time we don't have an internal feature to automatically translate your forms - we worked with Weglot to make this possible.

Here are the requirements:

  • Weglot Account
  • MightyForms Business account
  • Google Tag Manager

Check out our quick video tutorial or follow the step-by-step below:

Auto translating embedded form

Step 1. Create a Google Tag Manager container that you would use for MightyForms.


Step 2. Add the new Tag and use Custom HTML as tag type. Copy the Weglot code to your Custom HTML tag. Add "hide_switcher: true" to hide the switcher in iframe.

Example code:

<script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js"></script>
<script>
Weglot.initialize({
api_key: "wg_xxxx",
hide_switcher: true // You already have a switcher in parent window
});
</script>

Example GTM tag:

Example HTML Tag

Step 3. Save your tag and hit Publish button. Go through the steps to publish your GTM container. Copy your GTM container number (Example: GTM-xxxxxxx) and go to your MightyForm.

Publish your container and copy GTM number

Step 4. Go to your MightyForm > Settings > Google Tag Manager and add GTM container number. Update the form.

Step 5. Update your website Weglot code to include iframe translation. translate_iframes: ["#iframe-id", ".my-little-iframe"], replace #iframe-id with your MightyForms form ID, such as "#mf-71480a0f-219c-43fd-ae99-0b677b440838", and replace .my-little-iframe with any styles that are applicable. Make sure you keep the #mf- part, as example below shows.

Example:

<script type="text/javascript" src="https://cdn.weglot.com/weglot.min.js"></script>
<script>
Weglot.initialize({
api_key: "wg_xxxx",
translate_iframes: ["#mf-71480a0f-219c-43fd-ae99-0b677b440838"]
});
</script>
Did this answer your question?