Skip to content Skip to sidebar

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client reported that while navigating their multilingual website, which includes English, French, and Arabic, the site automatically switched to English when clicking on links, despite French being set as the default language.
Solution:
We identified that the main menu did not have translations set up for each language, causing the site to revert to English. We recommended creating separate menus for each language and provided guidance on how to do this with a link to our documentation: Translating Menus. Additionally, we accessed the site's backend and assigned the correct French menu in the Elementor settings, which resolved the issue.

If this solution does not resolve your issue, or if it seems outdated or irrelevant 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 problem persists, please do not hesitate to 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 8 replies, has 2 voices.

Last updated by Mihai Apetrei 1 year, 2 months ago.

Assisted by: Mihai Apetrei.

Author Posts
June 13, 2024 at 5:58 pm #15737475

adsT

Background of the issue:
I installed WPML and deployed a site with 3 languages (English, French, and Arabic) while setting French as the default. The site is currently under development.

Symptoms:
When I navigate on the website in a language other than English, it switches automatically to English.

Questions:
How can I prevent the website from automatically switching to English when navigating in other languages?

June 13, 2024 at 7:52 pm #15737710

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

The pages look fine for me. I tried switching the homepage to each of the available languages and nothing wrong happened.

Maybe what you are seeing is a cached version - can you please check the site from a different browser or device?

Please let me know how that goes.

Kind regards,
Mihai Apetrei

Screenshot 2024-06-13 at 22.38.09.png
Screenshot 2024-06-13 at 22.39.20.png
Screenshot 2024-06-13 at 22.37.56.png
June 14, 2024 at 1:38 am #15738030

adsT

The issue is not when I switch languages, here's the scenario:

You go on french for example, on the home page, and you want to check other pages in french, you clic on any link, it will show you that page but in english.
Same for arabic, whatever link you clic you'll be redirected to english.

I tried clearing the cach, using another browser, and 2 other people tried it.

June 14, 2024 at 11:09 am #15739813

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Thank you for the extra information.

Now, I can understand the issue better.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Our Debugging Procedures

I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- Please make a backup of the site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box.

The private box looks like this: hidden link

I will be waiting for your response.

Mihai

June 14, 2024 at 6:59 pm #15741165

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi, and thank you for the credentials.

I can confirm that I was able to log in successfully.

I am spending more time on this and will get back to you as soon as I have more feedback.

I will leave the ticket assigned to myself for now.

PS: This is just a note that I won't work over the weekend. I will get back to work on Monday. (I'm mentioning this in case a reply comes this weekend.)

Kind regards,
Mihai

June 17, 2024 at 7:15 pm #15746763

adsT

Any feedback?

June 17, 2024 at 8:19 pm #15746838

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

The issue here is that there is no translation for the main menu:
hidden link

The main menu is set to be used in Elementor, so it is always using the one from EN, that is why all the URLs in the menu are sending to the EN version (/en).

Also, the main menu was created from the English backend, while the default language is French (not sure why this happened - maybe EN was the main default language initially and this changed afterward, I don't know).

Please take a look here, too, so that you can see the steps that you can follow:
https://wpml.org/documentation/getting-started-guide/translating-menus/#fully-custom-create-menus-manually

Please let me know how things go.

Mihai

Screenshot 2024-06-17 at 23.15.23.png
June 18, 2024 at 12:43 am #15746980

adsT

I still need help,
I added the different menus, but it didn't work right, so I did the menu synchronization, but it messed it even more, now it displays the wrong menu language...
I'm sorry, how can I revert it?

June 18, 2024 at 9:11 pm #15750967

Mihai Apetrei
WPML Supporter since 03/2018

Languages: English (English )

Timezone: Europe/Bucharest (GMT+03:00)

Hi there.

I removed the caching and then I went here (hidden link) and assigned the French menu (the EN was selected initially).

After I did that, it started to take the correct menus from here:
hidden link

Can you please check from your side and let me know if it works correctly for you now, too?

Please let me know.

June 19, 2024 at 2:05 am #15751546

adsT

Thank you very much 🙂 you've been more than helpful 🙂