Individual languages for WordPress Mu sites

For WordCamp UK 2009, we’re having a dual language site (currently in the works, but hopefully near completion soon), where the content will be available in English or Welsh (as our host city is Cardiff). I had a scout around the various multi-language plugins, and none of them really seemed to hit the spot (mostly because there seemed to be too much UI jammed onto the screen), so I’ve decided to go with WordPress Mu running with a sub-directory for each language.

Laura and I have been careful to ensure that the theme is translation friendly, using the __() and _e() functions to provide WordPress i18n. The slight headache just now came when I needed to make the admin area of the Welsh blog display in Welsh. Googling around sent me into various blind alleys, but the solution was as simple as you’d hope from a WordPress project:

  1. Install the WordPress .mo language file into wp-content/languages/lang-code.mo
  2. In the admin area of each blog go to Settings > General and at the bottom you will find a “Blog language” option (if it’s not there, or the languages seem incomplete, check your .mo files are in place); simply select your language, save the options and (bam!) your blog admin is completely translated. You’ll also see that the front end theme has been set to the language of your choice, the least that this will to is change the language code at the top of the HTML source, and if the relevant translation files are in place for that theme then the theme will appear in the relevant language. Now all you need to do is make sure your content is in the right language!

To set the default language for any new blogs, go to Site Admin > Default Language and make your pick.

One of the blind alleys I went up was talking about the WPLANG constant in wp-config.php, this is pretty irrelevant to WordPress Mu, just drop in your .mo files and go to the settings page for each blog.

Hope this helps someone, feel free to ask any questions in the comments and I’ll do my best to answer them from my limited knowledge.

6 thoughts on “Individual languages for WordPress Mu sites

  1. Danny

    Thank you very much for you generous post. It has been extremely useful to me in solving a similar multi-language setup problem with WPmu. Your learning saved me a real headache and a lot of time. Keep up with your good way to do things! Danny

    Reply
  2. simonwheatley Post author

    Thanks Danny. Let us know when you’ve got your WPMu multi-language site up, I’d be interested to see it (also interested in how you solve any translation workflow issues).

    …and if you’re in the UK, do come along to WordCamp UK 2009!

    Reply
  3. Javier

    Dear simon, Im trying to make my site multilingual as you did. I already followed your instructions but I dont know where I have to translate the text that appears in my front end Blog, I mean the admin area is translated but The site in fact is still in english.

    Any help will be useful.

    Regards

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

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