Skip to content Skip to sidebar

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 replies, has 2 voices.

Last updated by Prosenjit Barman 1 year, 11 months ago.

Assisted by: Prosenjit Barman.

Author Posts
August 7, 2023 at 4:23 am #14160925

marionP-6

I have our site translated into multiple languages using WPML. I noticed that while loading switches from the foreign languages, it switches to "en", which affects certain parts of the page. I cannot trace what triggers this.

August 8, 2023 at 12:50 pm #14169403

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hello There,
I hope you're doing well.

As you were disconnected from the chat, I had to convert that chat to a ticket and continue the investigation.

After a thorough investigation, I have successfully identified the primary factor responsible for changing the value of the 'lang' attribute in other languages. An API request was being sent to a third-party service called "Equally," which appears to be the primary source of the issue. After analyzing the situation, I used the browser developer console to block the API endpoint from loading. As a result, the problem was solved immediately. The 'lang' attribute value in the HTML tag is no longer getting modified after that.

I made a video during the investigation. Please check this video for a better understanding: hidden link

I'm not sure about how the API is configured as the source is not defined, but from the Header information, I can say that it is defined somewhere within your site.

I would recommend reaching out to the support team of the API service provider to inquire about the reasons behind the Lang attribute modification by their API. Since the issue originates from the API behavior and not from WPML, consulting with them will be the best option available to solve the issue. I hope you can understand.

If there is anything else you need help with, please let me know. I will be happy to help.

Best Regards,
Prosenjit