This thread is resolved. Here is a description of the problem and solution.
Problem: While using Elementor Pro and WPML CMS for a website, the client faced issues where selecting a language in the switcher loaded the translated page, but clicking a menu item reverted the language back to English. The client also inquired about updating PDF links per language and translating the contents of an enquiry form. Solution: We found that the "Menu Anchor" widget was empty in the translated language. We copied the anchors from English to Chinese and updated the menu URLs. We recommended the client to check if the header works correctly in Chinese. If you're experiencing similar issues, we recommend checking your "Menu Anchor" widget in translated languages and ensuring that the menu URLs are correctly updated.
Please note that this solution might be outdated or not applicable to your case. We highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket at WPML support forum.
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.
Background of the issue:
I am working on a website, hidden link, using Elementor Pro and WPML CMS. I am trying to manage language translations for menus, PDF links, and enquiry forms.
Symptoms:
When selecting a language in the switcher, the translated page loads, but clicking a menu item reverts the language back to English.
Questions:
How do we keep the selected language when clicking menu items that are anchors on the same page?
Is it possible to update the PDF link per language to a different document?
Can the contents of the enquiry form be translated into the language the user is writing in?
Thanks for contacting WPML forums support. I'll be glad to help you today.
1) Let us focus on one issue first. Please check this guide to know how to translate your menus.
2) Could you please share your Debug information with me?
You can read a detailed explanation about it here. (http://wpml.org/faq/provide-debug-information-faster-support)
The debug info will give me much information about how your site is configured.
1- Go to Appearance-> Menus
2- Switch the language using the top admin bar
3- Select the main menu
4- Check the URLs and translate them if needed
5- Update the translated menu
Hi Osama,
OK, I have now updated the menu with the new structure.... However how are you meant to apply a translated ID? It already has one (as per screenshot) but doesn't show in Chrome inspector.
Screenshot 1 - Translated Anchor ID
Screenshot 2 - New menu structure pointing to the translated ID.
Update: For some reason the "contact" last menu item does work?
I changed the first two menu items back to #ekowagyu and #about then ran the "Translate link targets" in WMPL > Settings - but didn't make a difference.
The only thing I can see different in Elementor is the Anchor is using the "Menu Anchor" element where as the contact anchor is linked to the "Section".... but I cannot see why this would make a difference?
Thanks for your update. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP) Preferably to a test site where the problem has been replicated.
Your answer will be private, meaning only you and I can access it.
❌ Please backup your database and website ❌
✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.
✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.
Thanks for the access details. I checked the issue and found that the "Menu Anchor" widget is empty in the translated language. (Kindly check this hidden link">screenshot)
I copied the anchors from English to Chinese. After that, I updated the hidden link">menu URLs.
Thanks for your update. We try to keep one issue per ticket in our forum. Continuing with one ticket per issue helps supporters focus on one issue at once and enables other users to find solutions to their questions faster.
Therefore, I've split the other issues and created new tickets with them: