Resolved
Resolved in: WPML 4.6.0
Overview of the issue
With the Twenty Twenty-Two theme, WordPress implemented the new Full Site Editing mode. Now, the menu should be added using a Navigation Block, instead of the traditional method through Appearance → Menus.
At the moment, it is not possible to add a language switcher to a menu created with the Navigation Block through the WPML → Languages → Menu Language Switcher option.
Workaround
You can add a language switcher using a shortcode.
- Add a menu using the Navigation Block.
- Click on the + icon to add a new item to the menu.
- In the text field, add a language switcher shortcode and hit enter. E.g. [wpml_language_switcher flags=1 native=1 translated=1][/wpml_language_switcher]
- Save the page.
- The language switcher should be displayed in the menu on front-end.
Any update when will this be added to the module ? The HTML added to a WPML menu with the “hack” is huge :
Regular menu, 5 lines of code:
Nous joindre
WPML menu :
English
(Anglais)
Hello there,
This is already in our roadmap and should be fix soon.
We will update it when we have any news.
Thank you for your understanding.
Regards