multilingual

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:

  1. The “Two-Tree” concept ( we use “language” categories )
  2. Automated translation (using google languages or babelfish)
  3. Manual translation using plugins ( I could only find one really good plugin that can do that so we’ll look into that)
  4. 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.

For this I’ve installed a new Wordpress blog here, installed our plugin (you can download and install it from here) and the Thematic theme ( because I do like it a lot! )

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.

static_homepage

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.

setup_wpml

The next step lets us select the secondary languages for our site. I’ve selected Romanian.

select_lang

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.

language_switcher

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.

add_translation

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.

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

translate_category

Translating various strings in Wordpress like blog title, blog description or widgets

Our next stop is the String Translation under the WPML tab.

string_translation

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!

Theme translation

The only thing left for us now is to translate our theme.

theme_translation

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.

Conclusions

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.

Final thoughts

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!

By CristianThis entry was posted in Recomended Reading, Wordpress and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
  • The sooner the better: You should follow me on twitter here.

16 Comments

  1. Basilakis creativeg.gr
    Posted October 10, 2009 at 9:22 am | Permalink

    Hey, i want to ask a question.

    Does this plugin have an if statment also, so we can actually use it and change the logo for example of the blog?

    • Cristi cozmoslabs.com
      Posted October 10, 2009 at 11:04 am | Permalink

      I’ve used this small function that I’ve added inside the functions.php of the theme:


      function clang(){
      if(ICL_LANGUAGE_CODE=='en'){
      echo 'en';
      }
      if(ICL_LANGUAGE_CODE=='es'){
      echo 'es';
      }
      }

      Then, inside my theme I’ve inserted a language dependent image like this:


      <img src="<?php bloginfo('template_url'); ?>/images/logo-<?php clang() ?>.gif" alt="Logo" />

  2. Amir Helzer wpml.org
    Posted October 10, 2009 at 3:29 pm | Permalink

    Thanks for writing a great tutorial. It’s much better than our own ‘getting started guide’.

    The two points you made are good. We’ll make the ‘Advanced’ link into a proper button in the next minor release. We know that we need to rearrange wpml.org and will do that soon too.

    • Cristi cozmoslabs.com
      Posted October 11, 2009 at 10:37 am | Permalink

      You guys did a great job with this plugin! Keep up the good work!

  3. Girlie | Digital Roo blog.digitalroom.com
    Posted October 17, 2009 at 10:28 am | Permalink

    A multi-lingual blog is a great idea. It’ll definitely increase readership and traffic for your blog.

  4. hanum nustaffsite.gunadarma.ac.id
    Posted October 28, 2009 at 11:33 am | Permalink

    so nice info sharing. Thank’s a lot for informatif posting ^_^

  5. designfollow designfollow.com
    Posted October 31, 2009 at 5:46 am | Permalink

    thanks for this great post

  6. Daggett tripter.com
    Posted November 4, 2009 at 8:43 am | Permalink

    We’ve just started putting WPML to use and it’s potentially outstanding, but we have a few frustrations and questions:

    THEME COMPATIBILITY
    Many advanced themes don’t display the widget language selector properly (tried a few from ElegantThemes.com). We’ve found “multi-language” themes that are a bit friendlier to WPML and include po files, but some are better than others. It would be nice if WPML provided a review system of WPML friendly themes.

    LANGUAGE SELECTOR ISSUES
    These same themes don’t display the language selector when I post the PHP code in the header (or maybe it’s just that I’m not a programmer). In fact, I don’t even see the code snippet when I check the source code – it disappears.

    “TEXT-DOMAIN”???
    I’ve searched, but I’ve had trouble finding out exactly what a “text-domain” is, when it’s needed, and how to set it up properly.

    Any advice would be much appreciated!

    • Cristi cozmoslabs.com
      Posted November 4, 2009 at 10:33 am | Permalink

      You should address these issues to WPML forum. This way more people should benefit from this discussion.

      As far as theme compatibility, if the theme isn’t localized then there is no way to built a multilingual website with it. You don’t have to have the .po files, because you can use “Translate the theme by WPML”… but the theme still has to be localized with gettext (for more info about how Wordpress translates content here: http://codex.wordpress.org/Translating_WordPress#Localization_Technology)

      Language selector… have you checked to see if there exists a translation for each page? Because for example, if we have the page called “ABOUT” and it’s in english but we don’t yet have the translation for it, then the Language Selector isn’t displayed on that page! It’s only displayed on pages that have a translation. This could be the reason your Language Selector disappears!

      And finally the TEXT-DOMAIN! That’s quite simple. When you localize a theme you use the gettext functions in php: _e($message). This is fine, but sometimes you want to separate all the gettext calls into categories, for example all gettext calls from a particular theme. To do that you use something like this: _e($message, ‘your-theme-name’), where ‘your-theme-name’ is the text domain!

      If you’re still having issues with it and just want someone to make it work you can send me an email! http://www.cozmoslabs.com/wordpress-services/

  7. 8207h32 webedewe.com
    Posted November 17, 2009 at 2:33 pm | Permalink

    Yes, it’s really great started guide article, saved my time. It’s help me a lot using WPML plugin. Thanks.

  8. Posted December 2, 2009 at 11:20 am | Permalink

    Thank you, this is a very interesting tutorial for a very interesting plug-in. Congratulations to developpers.
    But can we edit the translated pages for SEO purposes ? I mean : I’m French, I want to translate my website in English to address US market. I must edit my meta-tags on English translated page, etc etc.
    Will this be possible ?
    Thanks again

    • Cristi cozmoslabs.com
      Posted December 3, 2009 at 10:46 am | Permalink

      Yes.

      Have a look at this page: http://wpml.org/2009/10/wpml-compatibility-for-popular-themes-and-plugins/

      Basically WPML work well with the “All in One SEO Pack plugin” for Wordpress. This means you’ll be able to translate all your meta-data.

      • nathanael thebilingualpsychologist.com
        Posted February 9, 2010 at 4:40 pm | Permalink

        Very clear and informative post Cristi, well done.

        I have been looking for SEO-specific information on the WPML website and forum to no avail. You seem to be quite familiar with WPML so I’ll post here.

        I just installed WPML and am using two domain names, one for each language (English and French). So far so good.

        I have had All-In-One SEO Pack installed for some time now (it’s all configured). The “blog title tag” and “description tag” of the home page don’t seem to be compatible with WPML (i.e. I can’t translate them).

        I then installed Headspace2 as recommended by WPML. Same, I’ve found many options to edit many other tags (page, post, categories, etc.) but not the meta tags on the home, i.e. “blog title tag” and “description tag” (and why not “keywords tag” though I’m not too concerned by that).

        I’m using two domain names, so as far as the user is concerned I have two home pages. I would therefore like to be able to configure two “blog title tags” and two “description tags” (two different SEO strategies in two different languages). Both AIOSEO and Headspace2 seem to only offer one “blog title tag” and one “description tag”.

        Any ideas?

        • Cristian cozmoslabs.com
          Posted February 9, 2010 at 5:27 pm | Permalink

          You have me at a loss here. I’ve installed HeadScape 2 with the latest WPML but I’m really not sure if you can translate the homepage. Best way to go about this is post on the WPML forum here: http://forum.wpml.org/

        • nathanael thebilingualpsychologist.com
          Posted February 9, 2010 at 7:22 pm | Permalink

          Thanks Cristi, I’ll post there too.

          I think I must be missing something big or there’s something at the core of SEO that I haven’t understood. In my understanding, the especially and of each page, and *especially* the home page (or let’s say the main landing page), are paramount to a good SEO strategy. It just seems impossible to me that WPML would translate all meta tags but those two (which incidentally happen to be the two most important for Google SERP snippets). So I’m definitely missing something :-)

          I’ll see what they have to say on the WPML forum. Thanks though.

  9. Posted December 3, 2009 at 7:44 pm | Permalink

    Awsome. Thanks for your answer Cristi.

6 Trackbacks

  1. By links for 2009-10-30 | Metaverse3d.com on October 31, 2009 at 3:05 am

    [...] Multilingual Wordpress – WPML Plugin Review (tags: wordpress plugin multilingual translate) [...]

  2. By Bookmarks for November 11th → Quality Peoples on November 11, 2009 at 9:29 pm

    [...] Multilingual Wordpress – WPML Plugin Reviewtutorial on building a multi-language blog/website with Wordpress and the WPML Plugin. This entry was posted in bookmarks and tagged 3d, avatar, cappuccino, collaboration, costume, dannyhess, delicious, Design, development, director, film, halloween, howto, ia, inspiration, jamescameron, language, losangeles, minimal, mockup, movies, multilingual, newyorker, origami, papercraft, Photography, plugins, prototyping, quiverstudios., surfboards, surfing, ui, ux, webdesign, wireframes, wood, woodensurfboards, wordpress. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL. « Luca at Nine Months [...]

  3. [...] Multilingual Wordpress – WPML Plugin Review“Multi lang WP sites” [...]

  4. By untell.com on December 6, 2009 at 1:10 pm

    Multilingual Wordpress – WPML Plugin Review…

  5. By Multilingual WordPress Sites « lenocin.com on February 12, 2010 at 11:27 am

    [...] to invest my time nutting out the WMPL plugin.  You can read Cristian’s tutorial on using it here, and watch the WPML Intro videos if you are a lazy bum like [...]

  6. By In bed with Wordpress #3 « Best Wordpress Theme on March 13, 2010 at 12:48 am

    [...] Multilingual Wordpress – WPML Plugin Review – Test du plugin multilangues WPML, [...]

Post a Comment

Your email is never published nor shared. 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>

Subscribe without commenting

  • Featured Theme

    Smarter Wordpress Theme

    Smarter is a Wordpress theme for small and medium sized companies. It's meant to build a presentation site in a minimum amount of time without touching a single line of code.

  • subscribe

    through RSS

    Or, subscribe via email:

    Enter your email address:

    Follow me on Twitter