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.
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
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.