To support Multi-language websites we use a plugin called WP ML, here’s how to set it up and rock P4 in as many languages as you wish.

📚 Manage Planet 4 > Administration > Multi-Language P4 Site

Greenpeace Offices may operate in multi-language countries, and their websites must support multilingual content.

The initial requirement for your P4 deployment is to install the WPML plugin. Once done, follow the steps below to set up the language switcher in the navigation bar and determine the behaviour of the plugin.

WMPL Settings

🔎 Where can I find this ? Dashboard > Settings > WPML > Languages

wpml-settings

Set up your P4 Languages

On the “Language switcher options” make sure to display all languages (see below), for the language commands to work properly. You can determine whether content that has no correspondent in all languages should redirect users to the home page (RECOMMENDED) or just not have the switcher.

wpml-options

🤔 Key Info : WPML provides the multi-lingual functionality to your P4 site. To customize the site commands (Search button, strings etc.), check translate your P4 site.

Set up the Language switcher

In order for the Language switcher to be visible you need to add it to the Navigation Bar Menu.

Once you click the relevant option you’ll get a pop-up, as shown below. Change the settings to meet the ones shown and click Save.

wpml-nav

Frontend

After all the above changes you should be able to see the Language switcher on the website’s Navigation bar.

The multilingual menu of greenpeace.org/mena

🤔 Key Info : This setup does not support a Primary / secondary language. All site languages are equally set up. 

Language URL

WPML should by default use “/lang/”+slug URL constructions. All languages have a language identifier in front of the WP slug. This means that P4 multilingual URLs would look like this:

Why?

WPML can be configured to insert a language identifier in front of the slug instead of at the end, and to insert a language identifier at the beginning of URLs for content in the primary language just as for other languages.

The question is whether this WPML configuration will work with the P4 WP customizations. We can always configure WPML in our P4 deployment according to our tastes, but it would be  better to know that this mode of operating is supported by the GPI team by default from the outset, and won’t break in later updates to the P4 core.

New content creation / translation

When you create content in one language, it is possible to translate in the second language of your P4 site.

EXAMPLE: I want to create a PR in the Canada staging site, in both English and French.

Here’s how to duplicate one P4 content (in this case a Post) from one language to the other, you can also keep images!
The translated version of my Post. I can see at any time the original version on the right side

Connecting existing content to its translation equivalent

It’s possible to connect an independent page or post to its translation equivalent, if this was not done at creation phase.

Just hit the “connect with translations” command on the page control panel (right side), and type the name of the language variation. The system will also ask you which language should be the primary one. You need to save and refresh the page to save the configuration!

See .gif below.

Connecting a page to its translation equivalent

Media Translation

The WPML Media Translation allows to choose images and other media for translated content. We will be able to provide replacement images for content in different languages and translate the meta texts of those images.

🔎 Where can I find this ? Dashboard > Settings > WPML > Media Translation

Links & Resources