Photo by derSven
One of the hardest things to do with WordPress is creating a multilingual blog / website that is easy to maintain and develop.
My interest on the subject comes from the need of my customers for easy to maintain multilingual websites. This way they can extend their services to new markets.
I’ve had this discussion in the past, with a description of various plugins and methods to develop a multilingual WordPress blog / site.
In that article I’ve talked about the theory behind multilingual web-developement and mostly about the multilingual WordPress and four ways of implementing it:
- The “Two-Tree” concept ( we use “language” categories )
- Automated translation (using google languages or babelfish)
- Manual translation using plugins ( I could only find one really good plugin that can do that so we’ll look into that)
- Semi-automated payed translation. (this is rather an ingenious concept and I believe the people who created the service will have a lot to gain from it)
Today we’ll talk about a new and really interesting
Wordpress multilingual plugin: WPML.
The interesting thing about this multilingual plugin is the way it organizes the information. It’s completely different from qTranslate (that I presented in the previous multilingual blog post). Instead of using language tags (that separates the content in different languages), MPLM links one post in English to another post that will represent it’s translation in Spanish for example. This way you get to translate everything in a very clean way.
Beside this, there are more really cool features that help you get a complete translation done, like:
- Theme localization – Provide translation for texts that appear in your theme.
- Professional translation – an optional service, built for people who want to have their site’s contents professionally translated.
- Navigation – Control the appearance of site-wide navigation based on WordPress pages.
- Sticky links – This is an essential function for running full websites with WordPress. It guarantees that links between pages can never break.
- Home page link – All themes have links to the home page. This function will make that home page link point to the correct language.
- Hard coded theme links – Many themes include hard-coded links. This will make these links language dependent so that the link text and the target match the display language.
The Tutorial – Building a multilingual website from scratch with WordPress
The best way to showcase the functionality of this plugin is creating a tutorial in which we’ll create our very own multilingual website.
So far so good. Next we’ll need to add some content to our new website. This is going to be a site about a fictional company called “Lettuce INC.” that produces 100% natural lettuce (Lactuca sativa). 🙂
We’ll have four pages: Home, About, Blog and Contact. Also we’ve selected the Home page to be a static one (as opposed to displaying our latest posts). You can do this from the admin panel, just go under Settings → Reading.
The available languages will be English and Romanian.
Setting up WPML, the multilingual plugin for WordPress
Before we can start translating anything we need to tell WPML what languages we’ll have on our site. So head over in the WordPress admin and select WPLM → Languages.
The next step lets us select the secondary languages for our site. I’ve selected Romanian.
The third and final step to activating WPML consists of adding a language switched. This way the visitors will be able to easily select their preferred language. While available in the form of a widget, it’s also possible to insert it directly into the theme using the icl_post_languages() function, but this is outside the scope of the current tutorial.
Translating our content
Now that we’ve set up the plugin we can finally start translating our content.
We’ll start by translating the pages of our blog. To do so simply go to the edit pages admin panel in WordPress and there, we have a small “+” button that lets us translate individual pages.
This will create a new page for us where we can add the translated title, content, custom fields (if any) and basically anything needed for your page.
Another way of generating the same result would be to open (or create a new page for that matter) any page and on the right side, above the Publishing box, we have the language box.
Translating the blog
Similar to the pages we can translate blog posts.
Also we can translate categories and tags. This is a really useful functionality that in my opinion makes this plugin complete.
To do so we’ll go to the category page in the WordPress admin panel and click on the category that you want to translate. Then scroll to the bottom and in the Language box click “Add translation”.
Translating various strings in WordPress like blog title, blog description or widgets
Our next stop is the String Translation under the WPML tab.
You might want to “Save settings and rescan strings” first, just in case.
An interesting functionality here is the possibility to import/export .po files. The way this works is you export the English strings in .po format, insert them into PoEdit to translate them, export the Romanian .po files from PoEdit and then Import the translated file into WPML… Confused? Don’t worry… the only reason you might use this is if you need to hire someone else to translate your site but you don’t want to give them access to the WordPress backed to do the translation!
The only thing left for us now is to translate our theme.
There are two way of doing this:
- Translate the theme by WPML.
WPML will add the theme’s texts to the string translation page, where you can enter translations.
- Using a .mo file in the theme directory.
Include the theme’s .mo files in the theme’s folder and WPML will load the right file for each language.
Both are good ways… I’ve mentioned in the beginning that I’ve chosen Thematic for a reason and that reason is that it’s localized in a lot of languages… 13 to be exact (lucky number 🙂 ). This means if your needed language is between those 13 then you don’t have to translate your theme.
What I like
- It’s the first and only really complete multilingual plugin for WordPress
- You can easily translate any page, post, widget, theme text, blog string, plugin, etc.
- Professional translation. This is how the WPML team makes money! They offer the possibility to automatically translate your blog without touching a single string. This is done by real translators (no robots at the end of the line) so you get really good quality .
- Comments translation. So if you really want to take your multilingual blog to the next level then comments translation is the way to go.
What I didn’t like
- Ok… Call me picky… but PLEASE transform the “Advanced »” link into a BIG BUTTON in the Languages Section in WPML. I’ve searched for something like 2 hours for it. I thought it was removed or something in the latest version! I mean that’s where all the good stuff is, like selecting the URL format and admin language!
- The information on the WPML.org website is… terribly unorganized… there is a lot of good info there, just that it’s all over the place. There is a really informative forum… but there is no link to the forum in the main menu! You have to click the main support page and there you have a link to the forum. Not user friendly at all.
The WPML plugin is genius! It’s the best multilingual plugin for WordPress there is. As you could see the only things that I didn’t like were simple UI issues! But the core of the plugin is rock solid and the functionality it provides it’s just unprecedented! I wish the WPML team best of luck and congratulations for this really, really good multilingual plugin for WordPress! Keep up the good work!
Subscribe to get early access
to new plugins, discounts and brief updates about what's new with Cozmoslabs!