WordPress Multilingual Site Tutorial
How to create a multilingual site in WordPress
The default WordPress installation pack comes with one language (U.S. English). You can install other languages and if you want to, you can create a multilingual site. This means that your posts and pages will be offered in more than one language and visitors will be able to select the language in which they want to read the posts and pages. If you just want to change the default language without giving visitors on the frontend the chance to choose a language, check out the tutorial on how to install languages in WordPress.
In this tutorial we'll concentrate on setting up a multilingual site. This cannot be done with the built-in options offered by WordPress. A plugin for creating and managing a multilingual site has to be used. There are a number of plugins designed for that purpose. Depending on how the translations are stored, shown and performed these plugins can be grouped into a few groups. The plugins in a group share similarities in terms of managing the translations.
Note that depending on the plugin that you choose to use you may need to install the languages yourself. As we mentioned, you can find information on how to do this in the tutorial on how to install languages in WordPress.
Some multilingual plugins come with options for installing languages automatically so that you don't have to do it manually. There are also plugins (e.g. qTranslate) that come prepackaged with a few languages.
So let's continue with the different plugins for managing a multilingual site. We'll give examples of some such plugins, their basic features and an overview of how they are installed and managed.
Plugins that Assign One Language Per Post
With these plugins each post is assigned to a language. This means that the translated versions of the same post are actually saved as separate posts. Visitors on the frontend are provided with a language switcher with which they can change the language in which the site is displayed.
Such plugins are:
xili-language: It's installed pretty much as any other plugin. There are some specific things that should be kept in mind; you can check the installation instructions on the page of the plugin on the official WordPress site. After you install and you activate the plugin you can manage its settings by going to Settings menu>Languages sub-menu in the admin panel. At the top of the page that opens there are several tabs; each tab displays various settings:
This plugin doesn't have options for installing languages automatically so you have to install the languages manually. After that you can add the installed language from the options of the plugin (Settings menu>Languages sub-menu>Languages page tab).
You can add a language switcher in the navigation menu on the frontend. There are a couple of ways to do this. One way is to create a custom menu. To do this, go to Appearance>Menus in the admin panel and create the custom menu; from the Screen Options make visible the Language list panel and add a list to the custom menu:
Then make the custom menu the default one. If you need more information on creating and managing menus check out the tutorial on how to manage menus in WordPress.
An alternative is to create a custom menu, make it the default one, then go to Settings>Languages>Settings for experts tab and use the options there for adding a language switcher to the navigation bar:
Once the plugin is installed a panel with language settings will be available on the add/edit forms for posts and pages. Using these settings you can assign a post/page to one of the added languages. For each of the other languages in the list there will be a link that will automatically open an add form on which you can translate the post into the respective language.
Each language translation is added as a separate post.
When it comes to changing the language of the dashboard, a drop-down menu will be added to the admin bar (the top right corner) from which a language can be selected. It can also be changed from the profile options of the user.
The plugin provides all the options necessary for managing a multilingual site but it may be a bit more confusing and difficult to use for new users as compared to other plugins.
Polylang - convenient and easy to use plugin for a multilingual site. It's installed as any other plugin. After you install it go to Settings menu>Languages sub-menu in the admin panel. On the page that opens you'll see a form for adding languages. The languages that you add are installed automatically by the plugin (their .mo files are put in the /wp-content/languages folder on your WordPress hosting account). So you don't need to install them manually before you add them. Just select the language from the drop-down menu Choose a language and click on the Add new language button.
At the top of the same page there's a Settings tab which displays the settings of the plugin. From the page with the settings you can select the default language, you can choose whether the language on the frontend should be set according to the preferences of the visitor's browser. There are various URL options (some can be configured only if pretty permalinks are enabled from Settings menu>Permalinks sub-menu).
After the plugin is installed on the add/edit form of posts and pages there will be a panel from which you can choose the language of the particular post/page. If you're editing an existing post/page, there will be a link for adding the post in the other installed languages:
When a user selects a language on the frontend only posts belonging to that language are displayed. The plugin also comes with a language switcher widget. From Appearance menu>Widgets sub-menu you can add this widget to one of the available widget areas. This will display a language switcher sidebar on the frontend. You can also create a custom navigation menu from Appearance>Menus and add a language switcher to it.
The dashboard language can be set per user from the user profile settings.
Bogo - another useful and easy to configure and use plugin for creating and managing a multilingual site by assigning one language per post/page. It's installed in the usual way as other plugins; there's nothing special about its installation. This is a more straight forward plugin than the previous two, meaning that it has less options to configure. On the one hand, this makes it less versatile. On the other, it's less confusing to beginners and inexperienced users. The plugin doesn't come with options for installing languages automatically, so this has to be done manually. For more information on this check out the section on how to install languages manually in the tutorial on installing languages in WordPress.
After you install the plugin a language drop-down menu will be added to the top admin bar (the dashboard language can also be set from the profile settings of the user). From it you can select one of the installed languages. When you add a new post/page a Language panel will be present on the add form. It will be automatically set to the dashboard language, so after the post/page is saved it will be assigned to that language.
If you want to change the language to which a new post/page is assigned, you have to change the dashboard language from the menu in the admin bar. If you edit an existing post/page that's assigned to a language different than the current dashboard language, a button to translated that post/page into the respective language will be present in the Language panel. To display a language switcher as a sidebar on the frontend you have to add a language widget switcher to one of the widget areas. It comes prepackaged with the plugin. Just go to Appearance menu>Widgets sub-menu in the admin panel and enable the widget.
Plugins that Keep All Language Versions in the Same Post
These are plugins that keep all language versions of the same post in a single post, unlike the previous plugins that save each language version as a separate post.
One such plugin is qTranslate. It's one of the most popular and widely used plugins for creating and managing a multilingual site. It comes prepackaged with some languages. By default, the active languages are English, German and Chinese. After you install the plugin you can add new languages and manage the plugin settings by going to Settings menu>Languages sub-menu in the admin panel. At the bottom of the page you'll see a table with many languages. Most of them are disable by default. To make a language available on the frontend and backend click on its Enable button in the table.
The plugin also has options for adding more languages automatically. The form is right next to the table with the languages. To add the language however you need to know its ISO code (e.g. da for Danish) and the ISO code of the country (e.g. DK for Denmark), so that you can set the language code and the locale in the respective options. Once you add a language it will be listed in the table next to the form and you can enable it.
When you enable a language the respective .mo file for the language will be put automatically in the /wp-content/languages folder of your WordPress installation. Note that even if you manually put the .mo file of a language in /wp-content/languages, it will not be added and enabled as a frontend and backend language. You'll still have to use the plugin settings to do that.
On the Settings page of the plugin (Settings menu>Languages sub-menu in the admin panel) there are options for managing different aspects of the multilingual site. You can change the default language; there's an option for hiding untranslated content (if a visitor switches to a language, posts that are not translated in that language will not be shown). There are also options for the URLs of each language.
Unlike plugins that assign one language per post, with qTranslate you can manage the titles and content of all language versions of the same post on the same add/edit post form. On the add/edit post or page form you'll see title fields for all the enabled languages. In the top right corner of the text editor there are tabs with which you can switch and manage the content for each language.
The plugin comes prepackaged with a widget that displays a language switcher as a sidebar on the frontend. You can enable the widget from Appearance menu>Widgets sub-menu in the admin panel. From the options of the widget you can choose whether only the language names should be displayed, whether the flag should be shown in front of the name, or whether the switcher should be a drop-down menu. When it comes to changing the language of the dashboard, all enabled languages will be listed at the bottom of the dashboard sidebar panel. Clicking on a language will make it the language of the admin panel.
Plugins that Use Automatic Machine Translation
There are some multilingual plugins that are used for automatic machine translations of the content of posts/pages. The main advantage of these plugins is that you (or other admins) don't have to translate posts/pages; machine translations are performed automatically and so they can save you a lot of time. Another advantage is that not only the content and titles of posts and pages are translated but also menus, categories, site title and tagline, etc. On the other hand, machine translations are usually not very accurate and may produce some awkward results.
One such popular plugin is Transposh. The actual translations are performed with the help of Google Translate and Bing Translate.
It's installed as any other plugin; there's nothing additional that you have to do. After the plugin is installed a new menu labeled Transposh will be added to the sidebar of the admin panel. It has several sub-menus with settings related to the plugin. To enable languages go to Transposh menu>Languages sub-menu in the admin panel. On the page that opens you'll see a list of many languages. To activate/enable a language highlight it by clicking on its name with the left mouse button and then click on the Save Changes button:
Note that by default there's a limit of five languages. If you want to be able to add more and to use some additional options you have to upgrade to the full plugin version. You can do this by going to Transposh menu>Settings sub-menu in the admin panel and using the respective option there.
For users/visitors to be able to select one of the enabled languages on the frontend and thus see all the content translated in the respective language, you have to add the language switcher widget that comes prepackaged with the plugin. You can do this from Appearance menu>Widgets sub-menu. The widget will add a drop-down menu on the frontend. The menu will contain the enabled languages.
Another advantage of this plugin is that although it translates everything automatically, the translations can be edited. In this way you can correct translations that you think are incorrect. This can be done again on the frontend. Under the drop-down menu with the languages there's an Edit Translation checkbox.
When you mark the checkbox a small button will appear after each sentence or phrase. When you click on it a window will pop out. There you'll find the necessary options for changing the translation of the particular sentence/phrase.
Note that by default the settings of the plugin are configured in such a way so that anybody can edit translations, even unregistered users/visitors. You can change that by modifying the respective option. You can find it in the admin panel by going to Transposh menu>Settings sub-menu. There you'll also find some other plugin options.
There are other plugins for automatic machine translations but some of them are not supported any more; there haven't been new versions of these plugins for a while so you have to be careful not to use such a plugin as it may break your site.
Multilingual Multisite
It's also possible to create a multilingual multisite. Here you have the options to create a network of sites and each site to be in its own language (one language per site), or you can have each site in the network in more than one language (a network of multilingual sites).
In its most basic form you don't need any plugins to create and manage a multilingual multisite. You can install the languages you need and set each site to use one of these languages. Then you just type the content of the posts and pages of each site in the respective language. There are no links and connections between the posts of the different sites. For more information on this check out the section on installing languages on a multisite in the tutorial on installing languages in WordPress.
In case you want to create such a multilingual multisite with one language per site, meaning that you want each translation of the same site to be a separate site, there are some plugins that can help you in managing this multilingual site. Such plugins are Multisite Language Switcher and Multilingual Press. As we already mentioned, you don't have to use them to create such a multilingual multisite; you can just install manually the languages that you want and from the General settings of the admin panel of each site in the network you can set its language, but these plugins will provide some additional functionalities.
If you want each site in the multisite network to be a separate multilingual site (meaning that each site in the network is offered in more than one language), you can use one of the plugins describe above (e.g. Polylang, Bogo, qTranslate, etc.). Just install the plugin from the network admin panel and network activate it (if you want it to be used by each site). If you want the plugin to be used only on some of the sites, keep it network deactivated and activate it from the admin panels of the particular sites. Then you can use the plugin in the same way as with a single-site installation. From the admin panel of each site you can configure and use the settings of the plugin and make that site a multilingual one. With the help of these plugins you can offer each site in the network in more than one language and the languages in which one site in the network is translated can be different than those of another site in the network. For example, you can have site1.yourdomain.com in English, French and German, and site2.yourdomain.com in English, Spanish and Italian.