Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 1 reply, has 0 voices.

Last updated by Dražen 3 months, 3 weeks ago.

Author Posts
March 10, 2025 at 10:47 am #16795738

danielE-41

Background of the issue:
I want to add a different embed script code for different languages on my WordPress site using WPML. I am trying to use the following script: <script charset="utf-8" type="text/javascript" src="//js-eu1.hsforms.net/forms/embed/v2.js"></script><script>hbspt.forms.create({portalId: "145238364",formId: "24fc2f09-1b52-4c6b-a3b7-369b657e6287",region: "eu1"});</script>. The issue can be seen on this page: hidden link.

Symptoms:
The script is not showing in the translation 'ATE'. I expected to see the option of adding the script to different languages.

Questions:
How can I add a different embed script code for different languages?
Why is the script not showing in the translation 'ATE'?

hidden link

March 10, 2025 at 12:18 pm #16796374

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

Thanks for contacting us.

While you wait for my colleague to take over the ticket, let me try to help you with the issue quickly.

It is not expected to translate custom code via the WPML editor, nor to add custom code in such a way. But there are a few ways you can achieve what you wish:

1) You can disable the WPML editor and translate your page manually, and add different code:

- https://wpml.org/documentation/translating-your-contents/using-different-translation-editors-for-different-pages/

2) Add your code to functions.php and show different code depending on the language

- https://wpml.org/forums/topic/running-custom-php-depending-on-the-language-selected/

Let us know if this helps.

Regards,
Drazen

The topic ‘[Closed] i want that i want to add a diffrent embedd script code in diffrent language how to do that’ is closed to new replies.