This thread is resolved. Here is a description of the problem and solution.
Problem:
The client wanted to display the language text next to the flag in the main menu only after clicking the flag to show the submenu.
Solution:
We suggested the following steps:
1. Navigate to WPML -> Languages -> Menu language switcher.
2. Adjust the language switcher settings to show the names of the languages by clicking on the pencil icon.
3. Add the following CSS code to the style.css file in the root folder of the website's theme:
.wpml-ls-current-language .wpml-ls-flag + .wpml-ls-display { display: none;}
If that does not work, we recommended trying to target the current language menu and the sub-menu items separately with this CSS:
.gp-nav .menu li a .wpml-ls-display{ display: none; } .gp-nav .menu li .sub-menu li a .wpml-ls-display{ display: inline-block; }
Please note that the solution provided might be outdated or not applicable to your case. If the issue persists, we highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need 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.
This topic is split from https://wpml.org/forums/topic/switching-to-french-does-not-stay-on-the-post/
This topic contains 3 replies, has 2 voices.
Last updated by 8 months, 1 week ago.
Assisted by: Marsel Nikolli.