[Resolved] Language switcher does not show up in one of the language
This thread is resolved. Here is a description of the problem and solution.
Problem: The client reported that the language switcher was not working on the desktop version of their site when viewed in English, although it was functioning correctly in French. The mobile menu was unaffected. The site is using the Impreza theme, and the issue persisted even after the theme was updated to address a WPML compatibility issue.
Solution: We recommended the following steps: 1. Increase the WP Memory Limit to at least 128MB, preferably 256MB, by adding the following code to the
2. Clear all caches from any caching plugins and server/CDN. 3. Remove and re-add the Menu Language Switcher in WPML > Languages. 4. If the issue persists, test for a compatibility issue by deactivating all non-WPML plugins and switching to a default WordPress theme. 5. If necessary, provide access for further investigation and duplication of the site in a local testing environment.
After thorough investigation, we discovered that the desktop menu ("Menu principal") was missing a "CUSTOM LINK" for the French language, which was present in the mobile menu ("Menu mobile"). We added the missing custom link to the desktop menu, and the language switcher now appears correctly on the site.
If you're experiencing a similar issue, we recommend you try the steps outlined above. However, please note that the solution might be irrelevant due to being outdated or not applicable to your case. If the problem persists, we highly recommend checking related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. Should you need further assistance, please open a new support ticket.
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.
My site had the language switcher working since a long time and we found out that lately the language switcher does not work when we see the site in English, but it show when the site is in French. Seems to do that only on the Desktop version of the site, the mobile menu seems to work.
You can look at the site directly right now to see the problem.
1. I have noticed that your website’s WP Memory Limit is 40MB. The WP memory limit needs to be increased as the minimum requirement for WPML is 128Mb WP Memory Limit: https://wpml.org/home/minimum-requirements/
❌ Very important: please make a backup of your site (files & database) before following any of the upcoming steps ❌
Please add this to your wp-config.php file to increase WP memory:
These settings can be limited directly by your hosting provider, so, if that’s the case, I recommend you to contact and ask them to modify them directly. If you can get even higher values It would be great.
Please make sure you have updated the values successfully, You can verify them from WPML >> Support page.
2. If that doesn't fix this, can you please make sure that you clear all the caching from any of the caching plugins that you have active on the site + clear any server / cdn caching?
3. If that doesn't fix this, please go to WPML > Languages > Menu Language Switcher > Remove it and re-add it again and see if that fixes it.
I did all the changes you asked now the support page is showing 250 MB of memory.
I removed the menu switcher cleared the cache and confirmed that the siwtcher was gone from my French site. Then added it again clearing cache again and the switcher came back on the French page, but still not showing on the English page. Also the design of the switch changedm before I would only see the other language (English on the French page and French on the English page) now I see a drop down for the language switcher, I don'T mind at all, it's just to show that I really did delete the menu switcher and re-added it.
Yes, the fact that it looks a bit different is due to the fact that you had set different settings on the one before. You can go on WPML > Languages > Menu Language Switcher > and turn the switcher into a "List style" instead of "Dropdown style", you can also uncheck multiple other boxes like NOT showing the current language etc.
Thank you for trying all those steps.
Then, I'm guessing that there might be a chance that this issue might be caused by either the active theme or (at least) one of the active plugins.
Can you please let me know if this issue happens even when only the WPML plugins are active and you are using a default WordPress theme?
Please try the following steps so that we can test for a compatibility-related issue:
- create a full website backup
- disable all plugins except WPML and its add-ons
- check if the issue is happening again
- if it's not, reactivate your plugins one by one, checking every time if the issue shows up again so that you can understand which plugin is causing that issue
If the issue happens even with the non-WPML plugins disabled:
- leave all the non-WPML plugins deactivated
- switch to a default theme like TwentySeventeen
- try to recreate the issue now
If you have the chance, it would be best to do this in a staging (testing) environment.
Please let us know how that goes and if following any of these steps solved your issue or brought any change.
I was expecting not having to do that, creating a staging site, restoring the site, disabling everything... when buying a news subscription to get to support. I could not find the original email that was used with the lifetime subscription we have with the "working" plugin in the site at the moment. And to create a ticker you need an account and to have an account you need to buy something... 😉
If I really need to do all this, I will it'll take some time to do though. I'll be back with the results later.
Ok I did manage to have a staging site working and after disabling the template and playing around with the default menu to show the right menu the language switcher was shoiwing in both language.
I tried a lot of things on the staging site to try ond put backup the switcher in the secondary language with no success...
The template had a update and they were saying that it was suppose to solve a WPML compatibility problem, but it did not solve my problem.
The site is using Impreza.
Do you have a clue where I should look next? It's late here I'm going to bed, thank you in advance for your help.
Yes, I am definitely sorry that you had to go through all those steps but, in order to have me go through those steps, I would need a full website backup and your approval to duplicate the site on a local environment so I guessed it might be faster if I just share the steps.
So, from my understanding, you managed to get the language switcher show on both languages on the staging site but you are not sure what actually caused it to show up.
If that's correct:
1. Please let me know if you are ok with me duplicating your site on a local testing environment
2.
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.
- 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.
I did not get back to you yet because I am still investigating this issue.
I will need your written approval to be able to duplicate your site using a plugin called "Duplicator" and test your site on a testing environment so can you please let me know if this is ok with you?
After we find a solution for this, the duplicated site will be deleted.
Also, please create a full website backup before answering.
Thank you for all your amazing patience, François.
That really helped me focus and take the time to properly investigate this matter while understanding how things were built on this site (one of the hardest things is to work on something someone else already worked on because you don't know the route they took to build that thing - eg: if you start from scratch on your own, you know exactly what you did).
After a lot of time being spent on testing and debugging things, both on the live site and on the local testing site that I duplicated your site to, I was able to find the difference between the desktop menu and the mobile menu.
The way the menus are built on this site is that they are made of a lot of "Custom Link" elements (as you will see in one of my screenshots).
You can understand how these types of menu buttons can be created by going over this article here: hidden link
It seems that the person who built this site added "CUSTOM LINK" buttons for the mobile menu (called "Menu mobile") but there is just one button on the desktop menu (called "Menu principal") for English, but there is no button for "French".
You can in the URLs below the mobile menus for both EN and FR.
FR mobile menu: hidden link
EN mobile menu: hidden link
I added these buttons to the desktop version of the menu, too, and now they show up on the site correctly + you can also see them in the backend, in the menus area (at the very bottom), too.
FR desktop menu: hidden link
EN desktop menu: hidden link
I wish you great luck with the restaurant! The pictures make me hungry 😀
Wow, I'm genuinely impressed with your expertise! We were completely stumped by that issue, but you tackled it like a champ. Massive thanks for your help – you've made a huge difference to our site. Wishing you all the best. You rock! 🌟