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.
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.
As an Admin, go to Settings > WPML > 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.
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.
After all the above changes you should be able to see the Language switcher on the website’s Navigation bar.
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:
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.
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.
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.
The translate the media, Goto WPML >> Media Translation