Building a Multilingual Site with WordPress

by Mike Badgley on April 14, 2009

I’m working on a small multilingual Web site (English and French) for a client that needs to be done in WordPress, even though the site will not be used for a blog. Talk about the evolution (forced?) of WordPress from a blog to a CMS engine!

I’ve found many examples of sites that use WordPress as a CMS, but when it came to having a multilingual site, there were far fewer examples of this. After an hour of researching I settled on what appears to be the only workable solution for my situation – WPML (WordPress MultiLingual).

I have to admit what sold me most on this plug-in was the presentation and documentation of it on the author’s home page. I mean, most of these plug-in authors offer up a dogs breakfast in terms of presentation and documentation, so this was a nice and welcome change.

The installation went smoothly but after some testing and playing around with the plug-in I realized that this was not going to address my immediate needs – that being a direct correlation between English and French content. I needed something that would allow me to create a post or page in multiple languages. This did not appear to do that – although there is  a very good chance that I configured it incorrectly, but alas, I’m not a man with much patience! :)

Back to the drawing board, and wouldn’t you know it, as luck would have it the perfect solution (or what appeared to be) was on the same WPML Web site – the WP_Multilingual plug-in

I installed WP_Multilingual plug-in (version 0.9.6) by placing the contents of the downloaded .ZIP into the /wp-content/plugins folder. Once the plug-in had been activated, I was notified that a new content editor was required - Dean’s FCKEditor For WordPress. The installation of this plug-in was pretty painless – just followed the same steps that I did above.

After the activation of the FCKEditor plug-in (version 2.5.0), I went back to the landing page of the WP_Multilingual plugin by clicking on it’s menu entry in the left-hand sidebar. The status message (telling me to upgrade my editor to FCKEditor) was now gone.

The first order of business was to set the default language for the site (all posts and messages). I selected (en_CA) English/Canada.

Once the primary or default language has been selected, the customization options for the plug-in are displayed. Basically within this area you can choose if and where you want the language selector to be, to allow the user to switch from one language to another. This appears to be pretty customizable, so I should have full control over where I place the language selector/switch within the template.

I left the options at their defaults and went and added an additional language – French – by clicking the Language List link in the control panel of the plug-in. After adding the language a series of new options appear – namely the new name and tag line of the blog for the language you selected, as well as some other language code settings which should be fine if left to their defaults. Once the language was added it had to be activated, and then, tada, I had a fully multilingual CMS – all within WordPress!

I created a new post and now, instead of their being just one input field, there were a series of tabs for each language I had installed – each one containing the message field for inserting a post in the selected language. After creating a dummy message in both languages, the language switching worked flawlessly when viewing the published page on the Web site.

Important Note!

I found this out the hard way, but if you install and activate the WP_Multilingual plug-in before you have enabled “fancy” permalinks (i.e. URL rewriting) you will run into a whole lot of trouble and your site will basically be unusable. It is important to first enable the fancy permalinks, test to ensure that they’re working properly, and then you can activate the plug-in.

If you’re a dum-dum like me, you’ll have to go into the options (wp_options) table and erase the entry for permalink_structure. Otherwise, you’ll be unable to view the site or the options for Settings -> Permalinks.

5 comments

I love it! That is way cool man! The steps weren’t that complicated too, which is great.

by Arianafatt on May 13, 2009 at 4:41 am. #

I will leave a reply as soon as I try it Thank you

by JessicaMurn on May 10, 2009 at 9:35 am. #

[...] Life @ iStudio My thoughts on all things Web-related… with just enough hockey talk to curb my geekness! « Building a Multilingual Site with WordPress [...]

by Building a Multilingual Site with WordPress - Continued « Life @ iStudio on April 16, 2009 at 11:43 am. #

[...] Mike created an interesting post today on Building a Multilingual Site with WordPress « Life @ iStudioHere’s a short outlineI left the options at their defaults and went and added an additional language – French – by clicking the Language List link in the control panel of the plug-in. After adding the language a series of new options appear – namely the new … [...]

by Internet Marketing Email » Blog Archive » Building a Multilingual Site with WordPress « Life @ iStudio on April 15, 2009 at 12:25 am. #

Hi there,
Thanks for article. Everytime like to read you.

Thank you
Nadine

by Nadine on April 14, 2009 at 11:47 pm. #