MultilingualPress 4.0 provides a Gutenberg support module that lets you add a Language Switcher to your website directly from the block editor.
From the Global Settings panel of MultilingualPress (version 4.0 and above) is possible to activate the menu block switcher feature enabling the Gutenberg support module option.
Here you can find a step-by-step tutorial to activate and set up the new feature.
There you several options for your multilingual websites. Select the Gutenberg Blocks checkbox and then press the Save Changes button.
MultilingualPress Menu Block set up
↑ Back to topNow you can use the Gutenberg block editor to set the MultilingualPress Block Menu!
First, go to the post or page where you want to add a language switcher, click Edit and in the search box select the MultlingualPress Language Menu.
Then click on the block: this way, the MultilingualPress Language Menu option is rendered. In the right sidebar are shown all the different language subsites created within the multisite network: choose the site/language you want to add to the language switcher.
Please, also consider that the order of the language items in the language menu block is determined by the order in which you select the languages to be included. To change the order, deselect the languages and then reselect them in the desired order in the right sidebar.
That’s it! Now a language switcher should show up on the page.