Creating multi lingual mega menus with WPML

With Max Mega Menu and WPML you can create multilingual Mega Menus for your WordPress site.

In this example we will assume the site and menu has been set up already and WPML has subsequently been installed to add support for another language.

Our primary language is English and the language we’re adding is French.


Under WPML > Languages, make sure “Adjust IDs for multilingual functionality” is enabled.


Step 1

In this step we assume you’ve already set up a menu for your primary language (English) and enabled Max Mega Menu for it.

Ensure the “Language” setting for your English menu is set to “English”.

Ensure the menu is tagged to a Theme Location.

Finally, click the “French” link to create a new menu.


Step 2

We now have a new menu which will act as the French version of our English menu.

Give the menu an appropriate name and click ‘Create Menu’.


Step 3

We now need to tell WPML that this new menu is the French version of our English menu. To do this set the “Translation of” setting to your English menu.

Again, tag this menu to the same menu location as your English menu.

Finally click ‘Save Menu’.


Step 4

We now have 2 menus: an English menu and a French menu which are linked together.

You can now set up your French menu how you wish.


End Result

The English menu will be automatically swapped out for the French menu when the site is viewed in French. Max Mega Menu is enabled for both menus.


Fixing the language switcher

In the WPML settings there is an option to automatically add a language switcher to the menu. By default, the switcher will be malformed when used with Max Mega Menu.

To fix the switcher, add the following to your themes functions.php file.


Related Articles