How to Make WordPress Multilingual Using a Free Polylang Plugin
I'm going to show you how to make WordPress site multilingual we gonna go ahead and add a plugin called Polylang so let's go to plugins and add new and then in the search box on the right we going to enter Poly lung when the surgery salt is returned click activate the plugin is installed and we see it here in the plugin listing I know we're ready to go ahead and configure so the first step is to set up so the first step is to define which language we would like our website to be presented in so will navigate to the language icon unselected languages from this drop down at the top we'll first pick English and add to the list the we'll search for French.
On the table over here the black star shows which is the default language. The message on the top of the screen here is warning us that some posts don’t have a language allocated. This means there's a risk of the viewer not seeing them if a language is selected. We'll click this link to resolve, and allocate them all the default language in our case English.
Let’s see how this looks in the post section. There are two new column - one each for the languages i selected. The tick in the column means the post is setup as that language, clicking the + would create a corresponding post in that language
As an example let's use the hello world post. It's setup as an English post, and when we click the plus in the French column a new post is created/. We'll add a title and some content. Notice on this side the language is set as English. The translation equivalent post is shown as Hello world.
If you were to click the pencil you could select another post to be paired as the translation
This language selector menu option is going to solve this problem, select it and add it to the menu. In the options, my preference is to have a drop down, with flag and language name - but you can experiments and see what works for you.
We'll click save on the menu and see how that looks. The selector appears, and we can switch between English and French, but nothing changes when we do.
The next thing we're going to do is setup a French equivalent menu. Just like we did a moment ago with the hello world post. We'll make a new menu, and in the location manager we’ll define it as the one to display when French is selected. Remember to add the language selector here as well... and then choose the new menu as the French one.
Another check on the website, and we're still not getting any closer. The reason here is that the system won’t display a blank - the only thing we have provided a translation for is the hello world post - and that is not part of this page or menu structure. The system cannot find any French equivalents to the English content, so it cannot display anything
Let's change this home page temporarily to illustrate this. We'll go to settings then reading. Select your latest posts.
Now we see the hello world post on the home page - among several other post on the site. When we change to French, we are now getting somewhere. The system hides all the English posts, and displays the ones that are setup as French. If we switch languages back the English posts are show again as we’d expect.
If we open this post, and then switch languages, the system will show the page we indicated was the translated for hello world.
This is great if you want your blog posts on your home page, but most people don’t. So let’s set this up for pages now as well. On the pages grid we see the same two columns - a tick indicates the language, and the + allows you to create a linked translation page. When a page has an association you'll see a pencil icon here, like we did on the posts grid.
When we started, the website was setup to use this home page as the homepage. Let's click on the + to create a French translation page.
Returning to the website, we see the home page is restored, but when we change language, we only see this line of text, not the fully featured page
Unfortunately there is now some real work required. Let's take a look at the setup of this home page. It's made up of sections and text blocks and headings and a bunch of other elements and objects. All we entered in the French equivalent was that one sentence. You will need to create the home pages, and all the other pages, in French -ensuring each is linked to an English counterpart as we have seen.
That's about if for this demonstration of poly Lang and the principles for setting up your website to be multi lingual. As a final comment, I will mention WordPress Multilingual - WPML. If you don’t mind paying for this plugin you may find it event more flexible and functional that polylang or other free plugins out there.
WPML compatible themes: https://colorlib.com/wp/wpml-c....ompatible-wordpress- - premium
https://colorlib.com/wp/free-wordpress-themes/ - free