[Resolved] Header menu language switcher doesn't work properly
This thread is resolved. Here is a description of the problem and solution.
Problem: The client was experiencing an issue where the header menu language switcher on their website only displayed one language, despite the page being loaded for the selected language. The language switcher was set to a dropdown style, and changes in WPML settings did not affect the header after clearing the server cache. Solution: We first suggested changing the language switcher from a dropdown to displaying all flags on the same line by editing the settings under WPML > Languages > Menu language switcher. Additionally, we identified that the header template had not been translated, which was likely causing the issue. We recommended translating the Elementor header template following the steps provided in the documentation: https://wpml.org/documentation/plugins-compatibility/elementor/#translating-elementor-templates.
If this solution does not resolve your issue or seems irrelevant due to being 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 further assistance is needed, please open a new support ticket at https://wpml.org/forums/forum/english-support/.
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.
From what I can see, you are using the "dropdown" styling for the menu language switcher, so as you can see in my screenshot, you first need to hover your mouse over the language switcher to see all the language options.
I am unsure if this is caused by some settings from your current theme or because of settings added inside the WPML settings.
You can try to go to WPML > Languages > find the "menu language switcher" section > click the pencil edit icon > and from there, set the language switcher NOT to be a dropdown but to display all the flags on the same line.
Please let me know how that goes and if it resolves your issue.
There's a chance that the styling comes from your current theme or one of the active plugins. I will also look into the actual translation issue (I will create a separate ticket for that so that we handle only one unique issue per ticket).
I want to take a closer look. I would like to kindly request temporary access (wp-admin and FTP) to your site so that I can thoroughly examine the issue. The necessary fields can be found below the comment area. When you log in to leave your next reply, please be assured that the information you enter is private and will only be visible to you and me.
Our Debugging Procedures
I will thoroughly review various settings in the backend to determine if the issue can be resolved. While I will not make changes that affect the live site, it is still advisable to back up the site before granting us access. Should further debugging be necessary, I will create a duplicate and work in a separate, local development environment to avoid any impact on the live site.
- Prior to granting us access, please ensure that the site files and database are backed up.
If you do not see the wp-admin/FTP fields, please refrain from posting your website details as they will be made public. Kindly request me to enable the private box if you do not see the required wp-admin/FTP fields. You can find the private box by following this link: hidden link
Hi there, and thank you for your outstanding patience.
There must have been some server-related caching issues because the language switcher format now shows correctly, where flags display next to each other instead of the dropdown format.
Regarding the issue with the menu, I am still investigating that one, that's why I did not get back to you yet because I think the issue might be related to how the menu is being loaded.
I will get back to you as soon as I have updates about that issue, too.
I have come to a conclusion regarding the issue with the menu not being translated into other languages.
From my observations (hidden link), it appears that the header template has not yet been translated. This is likely why we see the "+" icons instead of a pencil-edit icon.
Could you please create a complete backup of the website and then proceed to translate the Elementor header template? Let me know if this resolves the issue for you.
You're right. After translating the header, the issue was resolved. The last question concerns the fact that any changes in the WPML—Languages—Menu language switcher don't affect the header, even after clearing everything from the server cache. If you could help with that part, too, that would be great!
The language switcher may be loaded differently and might not be sourced directly from WPML. I will take a closer look and see if I can resolve the issue.
I’ll get back to you with updates as soon as I have any.