Skip Navigation

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.

Tagged: 

This topic contains 7 replies, has 0 voices.

Last updated by Osama Mersal 1 month, 1 week ago.

Assisted by: Osama Mersal.

Author Posts
January 13, 2025 at 3:21 am #16586592

mitchellH

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?

January 13, 2025 at 10:35 am #16587688

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

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.

Best regards,
Osama

January 14, 2025 at 1:22 am #16591105

mitchellH

Hi there, Thank you for the reply - I have added the debug info.

The menus are translated - however once you click on a menu item, the page defaults back to the default language (English)

January 14, 2025 at 9:51 am #16592129

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Please try the following steps:

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

Best regards,
Osama

January 15, 2025 at 12:37 am #16595233

mitchellH

The menus are translated... please see image attached.

Screenshot 2025-01-15 103643.png
January 15, 2025 at 5:58 am #16595553

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

The URL in the translated menu should be (hidden link).

However, the translated page doesn't have the ID. (Kindly check this hidden link">screenshot)

In order to fix the issue, please add the ID to the translated page. After that, change the translated menu URLs to point to this ID.

Best regards,
Osama

January 15, 2025 at 8:59 pm #16599286

mitchellH

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.

Still doesn't work.... What am I missing here?

menu.png
Anchor.png
January 15, 2025 at 9:10 pm #16599320

mitchellH

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?

January 16, 2025 at 8:09 am #16600078

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

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.

Best regards,
Osama

January 20, 2025 at 10:53 am #16612680

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

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.

Please check if the hidden link">header works correctly in Chinese.

Best regards,
Osama

January 21, 2025 at 12:42 am #16615824
mitchellH

Hi, there - Ah i see.
I have now gone through and made edits to the rest of the menu / languages and are working - thank you very much.

Are we able to move onto the last two questions?

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?

New threads created by Osama Mersal and linked to this one are listed below:

https://wpml.org/forums/topic/translate-pdf-links/

https://wpml.org/forums/topic/translate-enquiry-forms/

January 21, 2025 at 8:57 am #16616843

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

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:

PDF issue: https://wpml.org/forums/topic/translate-pdf-links/

Form issue: https://wpml.org/forums/topic/translate-enquiry-forms/

Best regards,
Osama