Simple case for multi language sites
With the advance of globalisation and global availability of technology, localising your WordPress website and providing multiple languages will allow you can to tap into a bigger pool of audience. For example, the pie chart below shows that Asia comprises the largest percentage of Internet users by region in 2016 so there’s a huge market to tap into by making your WordPress site available in more languages.
Another interesting piece of statistics I came across is the low diversity of languages in the web versus IRL (in real life) so this shows there’s great potential in writing in more languages to allow others to access the web in their native language.
Setting up Polylang
So how do you go about setting up a WordPress multi-language site? I experimented with a number of plugins and found that Polylang could be implemented in a straight-forward manner. Here are the steps to do it:
1. Search and install Polylang plugin (https://wordpress.org/plugins/polylang): Admin Dashboard-Plugins-Add New-Search and enter Polylang in the keyword search field. Click on “Install Now” button.
2. Setup Polylang by going to Admin Dashboard-Settings-Languages
3. Add your default primary language first
4. Add your secondary language/s, in order of priority, which can be configured using “Order” field too. The “Order” field is used to determine the position of the language in the Language Switcher, which is a flag or text to allow the website user to switch the language.
5. The next step is to click on the “String Translation” tab and enter the relevant translation for each language.
6. You can accept the default for the rest of the values under “Settings” or change them according to your requirements.
7. If you have existing pages and posts in your WordPress site, you will see an alert box “There are posts, pages, categories or tags without language. You can set them all to the default language”. Do click on the link as shown below to set them to the default language.
8. (Optional) If you didn’t manage to set the existing pages and posts to the default language in the step above, you can do so manually. Go to pages first and clicking the top left hand box to select all pages. Then click the dropdown menu to select “Edit” and then click Apply.
In the next screen, select the default language and press Update. Repeat this step for posts too.
Translating existing pages, posts, menus, and widgets
1. The next stage of the process is to translate the entire site into other languages. I find that this is best done by duplicating existing pages, posts, menus, widgets, etc. so you don’t have to redo the formatting, images, and so on) from scratch. To facilitate this, I install 3 plugins (see step 1 above to see how to add a plug-in):
- Duplicate Post
- Duplicate Menu
- Widget Clone
Duplicate Posts and Pages
1. Duplicate Post plugin will duplicate or clone both pages and posts. You do so by click on the “clone” action when you hover near a Page or Post as shown below. In this example, I’m going to add a new language for the “Home” page.
2. After it’s cloned, edit the new page/post. In the Languages window, change the language to the new one that you want translated to. For example, in my case, my primary language is English and Chinese is the new language so I will change the language to Chinese.
Then under translations field, key in the name of the original existing page. In my case, this will be Home. As you start typing the page title, WordPress will display a dropdown list of relevant pages. Pick the correct one.
Translate the page and click Update to save changes.
Duplicate Menu is accessed through Admin Dashboard-Appearance-Duplicate Menu. Give the duplicated menu a suffix or prefix that identifies the new language and then go to Admin Dashboard-Appearance-Menu to select and translate the new menu.
Use Duplicate Widget by going to Appearance-Widgets and selecting a widget to duplicate and clicking on “Clone”.
If there are widgets that should only be visible for specific languages, click on “Visibility” button and select the language.
Language Switcher looks like the image below and can be added as a widget or a menu item to allow users to change the language manually.
If you find this helpful, please leave your comments or share the article.