This custom WPML language switcher template will display only raw text for menu item label. It does not contain any HTML tag. This is required for compatibility with some custom themes which are filtering the label (stripping tags or truncating).
Note: As we have no HTML tag in this template, the flag option is disabled.
- Copy this template folder into
{your-theme-folder}/wpml/templates/language-switchers/. - Go to the WPML -> Language page and scroll to the "Menu language switcher" section.
- Add or edit a language switcher for menus
- Use the "Language switcher style" dropdown to select the "Your theme - Text Menu Item" option (where "Your theme" is the name of the site's active theme) and save.