How to Build Multilingual WordPress Sites

How to Build Multilingual WordPress Sites

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:

  1. Plugins that create a new post for each translation of a post. These plugins then link the separate posts together and provide an indicator that one is a translated copy of the other. Examples are WPML, xili-language and Polylang.
  2. Plugins that store all the translations of a post in the original post. An example is qTranslate X.
  3. Plugins that automatically generate a translated copy of all your pages using an external service. Such as LocoTranslate or Weglot Translate.
  4. Plugins that link together separate WordPress installations for each language. An example is Multisite Language Switcher.

Every approach has its advantages and disadvantages. If you would like to explore the pros and cons of each, please visit the “How to choose the right multilingual solution” at 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:

  • Translate the core of WordPress.
  • Change the administrator’s language.
  • Manage multi-lingual posts.
  • Allow your users to switch languages by using a widget.

Step #1. Download and install language files

There are two types of files that deal with a 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 the three things:

  1. Install a complete copy of WordPress written especially for your desired language.
  2. Manually install language files on an English installation. You can download available translations from this page. To manually install a language file after you’ve downloaded it, place the language files in /wp-content/languages/.
  3. Use a plugin.

We’re going to use option #3. We’re going to use the qTranslate-X plugin for translating the content on the front of your site.

Step 2: Download and install the Native Dashboard plugin

tutuploadsStep_2_Download_and_install_the_Native_Dashboard_plugin..png

  • Go to your dashboard.
  • Go to Plugins then Add New.
  • Search for WP Native Dashboard.
  • Click Install after you find it.

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

tutuploadsStep_3_Access_the_plugin_s_settings.png

Access it by going to your Dashboard, then Settings, then Native Dashboard.

tutuploadsmedia_1326773478897.png

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.

  • Capabilities: choose one or a combination.
  • Logon screen extension: the user can specify his/her preferred language during login.
  • Dashboard quick switcher extension: the user can easily switch language on every admin page.
  • WordPress admin bar switcher: the user can switch language via the admin bar.
  • BuddyPress admin bar switcher: the user can switch language via the BuddyPress admin bar.
  • User profile setting: the user can define their preferred language via their user profile.

Step #4: Install the language files using the plugin

tutuploadsStep_4_install_the_language_files_using_the_plugin.png

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.

tutuploadsmedia_1326774839050.png

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 = ‘впишите сюда уникальную фразу’;

tutuploadsmedia_1326775441813.png

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:

  • extend the WordPress login screen
  • extend the backend header with quick switcher
  • extend the user profile 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

tutuploadsStep_5_Change_the_administrator_s_language.png

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

tutuploadsStep_6_Download_and_Install_qTranslate.png

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

tutuploadsStep_7._Settings_for_qTranslate.png

Go to Settings, then Languages to return to configure qTranslate.

tutuploadsmedia_1326778274906.png
  • Choose the default language.
  • Choose to Hide Untranslated Content or to show it. Read the instructional paragraph on the page for details on which is right for you.
  • Click Advanced Settings (Show) to expand that pane and configure those options.
  • Click qTranslate Services Settings (Show) to configure those options.
  • Save any changes you make.

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

tutuploadsStep_8._Configure_language_options..png

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.

tutuploadsmedia_1326779204464.png

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”.

tutuploadsmedia_1326779376381.png

The above image shows a sample of the edits you can make on a language file.

Step #9: Translate the post titles

tutuploadsStep_9_Translate_the_post_titles..png

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

tutuploadsStep_10_Translate_the_post_content.png

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

tutuploadsStep_11_Add_the_language_switching_widget..png

Go to the Dashboard, then to Appearance, then Widgets and drag the qTranslate Language chooser onto a sidebar.

tutuploadsthe_module.png

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.

Author

0 0 votes
Article Rating
Subscribe
Notify of
16 Comments
Oldest
Newest
Inline Feedbacks
View all comments
Ian Broom
Ian Broom
12 years ago

We find setting up a wordpress network, setting each blog in the network to a language, and using a redirection template based on the user’s language settings works better – it means each site can be configured differently and doesn’t need to be translated into all the different languages before it is put live.

See [url=http://blog.viadeo.com]http://blog.viadeo.com[/url] for an example

Frank
Frank
12 years ago

please see also this solution Multilingual Press

steve
12 years ago
Reply to  Frank

Thanks Frank. A link to Multilingual Press on [url=http://WP.org]WP.org[/url]: [url=http://wordpress.org/extend/plugins/multilingual-press/]http://wordpress.org/extend…[/url]

Frank
Frank
12 years ago
Reply to  steve

Thank you; i had this include my comment via html, but maybe you filter the comments. Thanks.

Nick
12 years ago
Reply to  Frank

You’re welcome, Frank! Yes, sometimes the comments can be buggy, but overall it’s been working great for us.

Kind regards,

Nick

Ejaz Siddiqui
Ejaz Siddiqui
12 years ago

Thanks Ed for an excellent Article,

I myself use qTranslate on [url=http://www.karcpp.org]www.karcpp.org[/url] and it works like a charm.

Nick
12 years ago
Reply to  Ejaz Siddiqui

You’re welcome, Ejaz! 🙂

Kind regards,

Nick

David Innes
David Innes
12 years ago

Where qTranslate works it works [i]very[/i] well. On the other hand I’m struggling to get it to translate menu items, widget text, and even obvious stuff like the title and tagline in General Settings. (Most often the qT tags are simply stripped out. Other times they’re just ignored.)

I’m very reluctant to modify the template itself to accommodate translation for reasons that include a) it’s a proprietary template (PageLines) and b) I hand the project off to complete non-techies upon completion of my contract.

Any ideas?

This is an excellent tutorial, by the way. And since pretty much everyone else also omits the menu/settings-strings translation problem I guess it’s no problem that you don’t either. (Or am I just missing something really, really obvious?)

Thanks!

Katie Camacho
Katie Camacho
12 years ago

Hi Ed, Thanks I found this post very useful. Careful planning and experimentation is a must to make the right decision on how to make your site multilingual. I agree that the qTranslate plugin makes WordPress very multilingual friendly. It is also linked with a professional translation agency Live Translation which allows users to buy professional human translated website posts directly from the WordPress dashboard using PayPal, that is very helpful!

pramanshu
pramanshu
11 years ago

Hi, this is post is very useful to me.thanks……

muhtarul
muhtarul
11 years ago

i use wp 3.5 and i there,s no download link for indonesian. really need help

XDude
XDude
11 years ago

This appears to be highly-excellent and exactly what I need! Thank you.

I don’t suppose you have a live, working example site somewhere?

Costel
Costel
11 years ago

Best articole from this category!

Many tanks!

Moona
Moona
10 years ago

Hi Dear,
Your article guide us very good.
Did same but getting issue on categories wise posts.
Please check [url=http://goo.gl/VspQL]http://goo.gl/VspQL[/url] then click on Business menue which showing all post instead of category wise post.
Also check Arabic language which have same issue on category wise.
Please Answer Shortly.
Moona

Drew G
Drew G
10 years ago

Website localization should be also mentioned in this article. Using a localization tool for translating strings in other languages with the help on native speakers is a really good method. I recommend [url=https://poeditor.com]https://poeditor.com[/url] for ideal crowd translations.

German learning Munich
German learning Munich
9 years ago

Thanks for the overview!

I’m looking for a plugin to implement a multilingual wordpress install.

Currently I have 3 different installations for my website [url=http://www.studio-navivo.it]http://www.studio-navivo.it[/url] but it is really a pain in the neck!!!

Based on your article I’m going to give a try to qtranslate, hope for the best.

16
0
Would love your thoughts, please comment.x
()
x