Multilingual WordPress – Setting up WordPress

Multilingual wordpress

Where exactly is the é on this keyboard?

In this fifth part of my series of articles on setting up a Multilingual WordPress site, we’ve looked at the basic requirements for setting up a Multilingual WordPress site, how to set up the Language Switcher plugin to allow us to create multilingual content and let the site visitor switch between the languages, and how to internationalise and localise the theme files.

The next steps are to:

  • Set up WordPress to run in the two languages
  • Troubleshoot any issues, eg with plugins

Setting up WordPress

Back in the first article in this series, I mentioned that we would be setting up a WordPress site to run in two languages – English and French. I also mentioned that the multilingual content is derived from the following:

  1. Posts and Pages which you write in the Dashboard.
  2. Your theme template files which often contain hardcoded text like headings, links etc.
  3. 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.

So far in this series, we have dealt with the first two of these three points. We now need to deal with WordPress itself.

Adding languages in wp-config.php

As mentioned in point 3 above, some text which is displayed in the browser is derived not from theme files, but from WordPress core files. Assuming that we want this text to be displayed in the relevant language, we need to enable WordPress to work with a second language, in our example, French.

Open up wp-config.php and look for this code:

/**
 * WordPress Localized Language, defaults to English.
 *
 * Change this to localize WordPress.  A corresponding MO file for the chosen
 * language must be installed to wp-content/languages. For example, install
 * de.mo to wp-content/languages and set WPLANG to 'de' to enable German
 * language support.
 */
define ('WPLANG', '');

In order to enable French, we change this:

define ('WPLANG', '');

to this:

define ('WPLANG', 'fr_FR');

Adding WordPress language file

The next step is to download the relevant WordPress language file. Access to the latest versions of WordPress language files can be found here: http://codex.wordpress.org/WordPress_in_Your_Language.

Download the language file and upload it to your /wp-content/languages/ folder. The sub-folder languages is not created automatically during WordPress installation, so you will probably have to create this folder manually.

Login to WP admin and you should now see the Dashboard in the second language. (You can switch between English and the second language using the dropdown menu at the top of the Dashboard pages).

Fully multilingual!

Assuming you have followed all of the steps in these articles, you should now have a fully functioning multilingual WordPress site.

Next instalment…

In the next, and final, part of this series we shall look at how to troubleshoot issues with plugins.

Comments

  1. Alessandro Bertolucci says:

    Hi there,

    I’ve hit a snag in creating a bilingual WP site.

    Just like in your example I’m creating an English/French bilingual site. I’ve followed your instructions and yet my site will not translate. My dashboard still shows English when I select French from the dashboard and when I switch language on the site – my written copy translates, but all menu items and such (including theme elements) do not.

    I think the fr_FR.mo file I downloaded from wordpress is no good, but I can’t tell if that’s the problem.

    I understand that you do not do support – but I’m hoping you could point me in the right direction with a suggest or insight.

    Thank you,

    AB

  2. Just dl qtranslate.
    Carefree bilingual or multilingual blogging plugin.
    Wait though until it is updated to current vers. of WP. Then do not AUTO update WP until Qtrans catches up with future releases.
    It’s a pita if you don’t wait for the updated vers. of qtrans.

  3. Hi,
    Thanks for this very detailed plugins to help building a WordPress bilingual website.

    I installed a theme called Classica on Worpress and I’m using WPML (pour blog). After following your tutorial, I still can’t display the theme automatic text in french, but only in the theme language english.
    I tried and retried but can’t find where teh problem is coming from.

    Do you have any ideas that could help me ?
    Thanks a lot in advance,
    Amandine

Leave a Comment

*


3 + = six

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>