It is possible to build great multi-lingual sites with WordPress. The WP core is not multi-lingual but there are several plugins available including WPML, xili-language, Polylang, qTranslate, Transposh and Global Translator.
In this tutorial, we're going to explain how those plugins work and help you decide which one is right for your needs.
The multilingual plugins fall into at least five distinct types:
Every approach has its advantages and disadvantages. If you want to explore the pros and cons of each, visit the WP codex and read more about your choices.
The purpose of this tutorial is to pick one of these methods and show you how it works. This will not be an exhaustive manual for implementing multi-language sites, but you will be able to manage more than one language with the techniques demonstrated.
In this tutorial, we'll show you how to:
Step 1. Download and install language files
There are two types of files that deal with language. Site-wide labels and messages are handled in files with the extensions .mo and .po. These files are part of the WordPress core, or are added by plugins and themes to handle extra text. Many contributors have created files you can use for this, and there are language localization teams you can consult.
If you want to add a language other than English to your site, you can do one of three things:
We're going to use option #3. We're going to use these two plugins:
Step 2: Download and install the Native Dashboard plugin
This plugin enables the selection of your preferred language.
This plugin also includes a repository scan on demand (svn.automattic.com) for available language file downloads. You can download the required files into your installation and immediately use them on admin pages.
Step 3: Access the plugin settings
Access it by going to your Dashboard, then Settings, then Native Dashboard.
At the top of the settings page you can click the check boxes to enable the capabilities you want. In the Downloads pane, click check repository to find the language you want to install.
Step 4: Install the language files using the plugin
The link to the downloads page should activate the progress bar, as shown in the picture above. When it is finished, you will have a list of language files to download. Be patient because this might take a while if you have a slow connection.
If clicking "check repository" doesn't initiate the svn search, you may not have a languages directory. Check your site's folders. There needs to be a writable languages directory located at /wp-content/languages/ otherwise the process fails. After creating the directory, make sure one of the Capabilities is checked and save the change. Then try the "check repository" link again.
Click the Download link to install the package.
An additional flag for each language will be added to the Installed Languages pane for each one you add.
Warning: Some languages provide a special xx_XX.php file disabling your login. Currently Russian (ru-RU) requires a small modification. The failure reason is the additional file needed for russian language named “ru_RU.php” in cooperation with your wp-config.php file. Change this line in your wp-config.php file to read:
$wp_default_secret_key = 'впишите сюда уникальную фразу';
On login, you will be presented with a language choice. Your members will be able to save the choice in their profile or login with their native language when they enter the site.
The main goal of this plugin is to control which languages can be used in the WordPress admin area. This addition of a language can only be managed by administrators. Other user can change the language they see, but not add a new language. The administrator defines what is allowed in the configuration by choosing one or a combination of the following settings:
This only changes the language of administration pages. We still need to deal with the front end language. It does not allow you to create posts or pages in multi-language versions. You will need another plugin for the front end view.
Step 5: Change the administrator's language
This plugin will add a language selector to your admin bar. You will be able switch the languages in the administration from a dropdown menu.
Step 6: Download and Install qTranslate
Go to your Dashboard, then Plugins, then Add new and search for qTranslate. Click Install Now.
qTranslate works best when installed on a site with no content. It will work fine if there is content, but there will be extra configuration steps involved. I suggest you install this on a test site first.
Step 7. Settings for qTranslate
Go to Settings, then Languages to return to configure qTranslate.
Note: qTranslate Services is a connection to a commercial translation service or an automated free service. Web Translations Services uses a network of freelance, in-country translators to return posts that sound natural to a native speaker of the language. There is also a free automated service, but it will only return a suggested translation that will not read naturally. You need an account with Web Translations Services for either the free or paid services.
Step 8. Configure language options
On the settings page you can configure specific settings for each language. Different countries use different conventions for date format and other localization specifics.
For an idea of what you need to configure click "Edit" for one of the pre-installed languages on the language table to the right of the page. A picture of the language table is below.
Choose additional languages. Deutsch, English and Chinese come pre-installed and enabled. You can simply enable any language you see here, and you can edit the files.
In the picture, Deutsch (German) is enabled. Francais (French) is disabled and can be enabled by clicking on the word "Enable".
The above image shows a sample of the edits you can make on a language file.
Step 9: Translate the post titles
Go to create or edit a Post.
You will be able to translate the post titles by typing the translations in the correct fields.
This is the easiest but also the most time consuming part of the process. Go to any post, page or category and you'll see editing windows for each language. Just write the translations in the appropriate fields. You have tabs for each version of the page.
Step 10: Translate the post content
Next to the Visual and HTML tabs you now have additional viewing tabs, one for each installed language. Choose the tab you want and write the article there in the chosen language.
Step 11: Add the language switching widget
Go to the Dashboard, then to Appearance, then Widgets and drag the qTranslate Language chooser onto a sidebar.
The image above shows the widget in the sidebar. I chose Chinese so you could easily see what would be translated by the uploaded language file. You can also see the parts that would need to be translated manually.
With these two plugins and the proper language file, you can present various languages on both the frontend and admin area of a WordPress site. Users can choose a language when they login so they can always be reading in their native tongue.
With Admincredible you can update and manage all your Joomla sites. If you have 5 or 500 sites, Admincredible will make your life easier! Visit Admincredible.com.
All of our tutorials are published under the Creative Commons Attribution-NonCommercial license. This means: