Welcome to a series of articles which, over the course of the next few weeks, will show you how to set-up a multilingual WordPress site.
For the purposes of this series I am going to be demonstrating the setting up of an English-French WordPress site. Of course, the techniques described in this series are applicable to any choice of two, three or even more languages, so feel free to use the information provided here and tailor it to your precise requirements.
Before we get involved in any coding and WordPress configuration, it is worth warning you that setting up and running a multilingual site does take more work than a single language site. But don’t be too put off by this statement! This series of articles will take you through the process step by step. I shall also be setting up a forum discussion on this subject so that you can post questions and get answers.
To start with, let’s understand some basics.
What is a multilingual site?
A multilingual site is one which the user can browse in more than one language. By this we mean that the site’s content is available in more than one language and by “content” I don’t mean just the posts and pages created through WordPress, but also all of the elements of the user interface.
Let’s, for a moment, think about what this means.
First, we need a mechanism for switching between languages. Luckily there is a plugin solution, the Language Switcher plugin by Jennifer Hodgdon of Poplarware. This is an excellent plugin and whilst there are one or two alternatives out there, Jennifer keeps her plugin updated, is an active member of the WP-Testers and WP-Hackers mailing lists for WordPress developers and testers, and she also provides excellent support. This is the plugin that I shall be using and referring to throughout this series of articles.
Second, we need to consider what needs to be language “switched” and therefore needs to be translated. If you think about a WordPress site, there are actually three sources of content which generate text which is displayed in the browser and which, therefore, we need to be able to language “switch”:
- Posts and Pages which you write in the Dashboard.
- Your theme template files which often contain hardcoded text like headings, links etc.
- WordPress itself. The core WordPress files also generate text which is displayed in the browser, for example the “More” tag and the “View all posts in this category” menu mouseover text.
We shall deal with these issues by following the key steps listed below.
The key steps in setting up a multilingual site
- Install and configure the Language Switcher plugin.
- Set up WordPress in different languages.
- Modify our theme template files so that they can be translated. Also known as “internationalisation”.
- Translate our modified theme template files and create the necessary language files for our site.
- Create multilingual Posts and Pages.
- Deal with plugins so that their output also switches languages. Don’t panic! This is not as hard as it sounds and, in all probability, will only be an issue for a one or two plugins depending on what you have installed on your site.
The articles in this series will take you through each of these steps. The next article will deal with the first step, namely the installation and set-up of the Language Switcher plugin. In the meantime, here are some useful resources to help you understand some of the issues discussed already:
From the WordPress Codex:
Why not use Google Translate?
A good question! However, although the quality of the translations is getting better and better all the time, for me there are two key drawbacks with this method:
- The user is taken off site. Will they come back?
- Machine translation. Although I admit that Google does a pretty good job, if your site content requires a certain tone of voice, or uses specialist vocabulary, it is unlikely that machine translation will do justice to your content.
A multilingual site does present some implications for SEO for the simple reason that each page in each language will be indexed separately by search engines. Whilst, effectively, this does split the page rank of each page, in reality your readers are likely to be using search engines in one language only. Therefore the usual SEO optimisations apply: write good content in both languages, use keywords in both languages, and keep your content up to date.