# Multilingual Content Forms

**URL:** <https://community.hubspot.com/t/multilingual-content-forms/43396>\
**Category:** CMS Development\
**Tags:** forms\
**Created:** [September 6, 2021, 1:59am UTC](https://community.hubspot.com/t/multilingual-content-forms/43396 "2021-09-06T01:59:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RafaelBran](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rafaelbran/32/89259_2.png) [@RafaelBran](https://community.hubspot.com/u/RafaelBran)\
**Post date:** [September 6, 2021, 1:59am UTC](https://community.hubspot.com/t/multilingual-content-forms/43396/1 "2021-09-06T01:59:47Z")

</div>

I am a complete noob in codes etc.

I am building a website in WordPress (with Elementor) and I would like to integrate a multilingual Contact form from Hubspot based on the language that the visitor will choose.

I tried different things but I was not able to solve this and the English form is the one appearing all the time.

I believe I need a conditional code to say something like : If the visitor chooses EN and is using [if lte IE 8], use this form OR if the visitor choses FR, then use that code.

Can anybody suggest anything for this?

Thank you in advance

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [September 7, 2021, 4:29pm UTC](https://community.hubspot.com/t/multilingual-content-forms/43396/2 "2021-09-07T16:29:50Z")

</div>

@Indra , @Anton

Could either of you help our friend @RafaelBran 😀

---

<div class="post-metadata">

**Author:** ![Indra](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/indra/32/98381_2.png) [@Indra](https://community.hubspot.com/u/Indra)\
**Post date:** [September 7, 2021, 8:38pm UTC](https://community.hubspot.com/t/multilingual-content-forms/43396/3 "2021-09-07T20:38:42Z")

</div>

Hi @RafaelBran,

What plugin do you use for the multilingual content tot display? If it’s wpml you van use this tot target your language:

if( ‘en’ == ICL\_LANGUAGE\_CODE ) {

//english

}

You can also use the object:

global $sitepress;

//get current language

echo $sitepress-\>get\_current\_language()

---

<div class="post-metadata">

**Author:** ![RafaelBran](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rafaelbran/32/89259_2.png) [@RafaelBran](https://community.hubspot.com/u/RafaelBran)\
**Post date:** [September 7, 2021, 9:59pm UTC](https://community.hubspot.com/t/multilingual-content-forms/43396/4 "2021-09-07T21:59:54Z")

</div>

Hello, First of all, thank you for taking the time to answer.

Now, to answer the question, I think I have none of this. I am basically using WeGlot to translate our website and I can only enbed the code through elementor.

So when I am on the websote in French and I want to paste the html code to the French form, it brings me to the English website every time which is not mirrored.

---

<div class="post-metadata">

**Author:** ![Indra](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/indra/32/98381_2.png) [@Indra](https://community.hubspot.com/u/Indra)\
**Post date:** [September 8, 2021, 5:49am UTC](https://community.hubspot.com/t/multilingual-content-forms/43396/5 "2021-09-08T05:49:30Z")

</div>

Hi @RafaelBran,

With WeGlot i’m not familiar, but if you say you place the French code on the French page it looks like a bug inside WeGlot.

An alternative that you could do is check the page language and set the form if it’s a certain language.

You can checkout this example: [https://codepen.io/ind88/pen/GRErWPm](https://codepen.io/ind88/pen/GRErWPm)

**The code is like this**

HTML:

`Page language: <strong class="output"></strong>`

Javascript&colon;

```lia-code-sample
// Get page language
var lang = document.documentElement.lang;

// Get output for demo usage
var el = document.querySelector('.output');
// Set output
el.innerHTML = lang;
// Debug info
console.log('Page language' + lang);

// If conditions
if(lang == 'fr'){
 // Your French code
} else {
 // fallback or default
}

```

---

<div class="post-metadata">

**Author:** ![DGuas](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@DGuas](https://community.hubspot.com/u/DGuas)\
**Post date:** [June 26, 2022, 8:36am UTC](https://community.hubspot.com/t/multilingual-content-forms/43396/6 "2022-06-26T08:36:26Z")

</div>

@dennisedson , @Indra , @Anton I have exactly the same problem on our website. Could you help us out? As we use weglot for translating the whole website, but just the Hubspot form is not translated. I would very highly appreciate help in this regard.

---

<div class="post-metadata">

**Author:** ![Indra](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/indra/32/98381_2.png) [@Indra](https://community.hubspot.com/u/Indra)\
**Post date:** [June 28, 2022, 6:16am UTC](https://community.hubspot.com/t/multilingual-content-forms/43396/7 "2022-06-28T06:16:47Z")

</div>

Hi @RafaelBran,

Since you have problems translating within WordPress combining WeGlot, I would suggest searching on there website for support.

Perhaps this page will help you translating custom parts: [Translations Hooks | Weglot](https://developers.weglot.com/wordpress/filters/translations-filters)

The first option I mentioned with javascript should also still work if you don’t want to work with filters because it’s checking the page language.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [June 30, 2022, 11:52pm UTC](https://community.hubspot.com/t/multilingual-content-forms/43396/8 "2022-06-30T23:52:07Z")

</div>

Thanks for taking the time to loop back here, @Indra 🙌
