How to add a WPML Language selector to the mobile toggle bar

In this guide we’ll go through some quick steps detailing how to add a WPML language selector to your mobile menu toggle bar using the language switcher shortcode which is built into WPML.

Step 1: Add an “HTML” Toggle Block to the mobile toggle bar

Go to Mega Menu > Menu Themes > Mobile Menu. Use the Toggle Bar Designer to add an “HTML” block to the toggle bar (see Mobile Toggle Blocks), and paste in the following shortcode:

WPML language switcher shortcode in an HTML toggle block

Save the theme. The shortcode attributes can be adjusted to suit your requirements: flags shows the language flags, native shows the language name in its own language and translated shows the language name in the current language. See the WPML documentation for all available options.

Step 2: Style the language selector

To style the language selector so that it fits in with the toggle bar, add the following to Mega Menu > Menu Themes > Custom Styling:

Final Result

You should now see a language selector inside your mobile toggle bar:

WPML language switcher in the mobile toggle bar

See also: Creating multilingual mega menus with WPML.