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 This entry was posted in Recomended Reading, Wordpress and tagged , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

49 Comments

  1. 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?

    • 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" />

      • Vilhelm
        Posted October 28, 2011 at 2:47 pm | Permalink

        simpler?

        function clang() {
        echo ICL_LANGUAGE_CODE;
        }

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

    • Posted October 11, 2009 at 10:37 am | Permalink

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

  3. 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. Posted October 28, 2009 at 11:33 am | Permalink

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

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

    thanks for this great post

  6. 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!

    • 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/

      • Posted March 11, 2011 at 8:08 am | Permalink

        Ho do you know is a theme have the gettext? please let me know!

        • Gabriel
          Posted March 11, 2011 at 11:04 am | Permalink

          Hy there kenedy!
          it’s fairly easy to check if a certain theme is localized or not.
          Step 1: (you can skip this step if you know a little bit of functions)
          Open the Twentyten theme folder from your /wp-content/themes folder and open the file header.php (for instance) and do a search for either of the following function calls: __( ‘Page %s’, ‘twentyten’ ) or _e( ‘Skip to content’, ‘twentyten’ ). These 2 functions use the gettext() feature built into WP

          Step2: open your themes folder and randomly select a .php file. Do a search for either “_e(” or “__(” (without the “”) and if your search gives you positive results, your given theme is localized.

        • Posted March 11, 2011 at 9:02 pm | Permalink

          Thank you!! i just bought te plugin.. i read that you can apply the gettext to a theme too.. I`ll let you know about it…
          Great response…

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

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

      • 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?

        • 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/

        • 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. Guillaume
    Posted December 3, 2009 at 7:44 pm | Permalink

    Awsome. Thanks for your answer Cristi.

  10. Posted May 4, 2010 at 11:01 pm | Permalink

    You did a great job with this plugin. Awesome!
    Keep it up!

  11. Denisa
    Posted June 15, 2010 at 9:47 pm | Permalink

    Thanks for this idea. I have a question…how it is possible through this plugin to have for each language some different keywords in the header section? Also … to have some different sidebar…I’m talking about WordPress here.

    • Denisa
      Posted June 16, 2010 at 11:10 am | Permalink

      I resolved that…Thank you very much

      • CRIS
        Posted October 5, 2010 at 1:41 am | Permalink

        Hi Denisa, can you suggest how to do it? and how to put the keywords on every post?

  12. Posted June 21, 2010 at 10:59 pm | Permalink

    Hllo, working on a new website at http://www.elcatey.com with WPML. For now in combination with All in One SEO but the problem is that you can not make seperate titles and descriptions for seo in AIOSEO. That is not working. Is this working with headspace? I was looking around and at one point they mentioned that there is a compatibility pack for headspace, but where?

    • Posted June 21, 2010 at 11:02 pm | Permalink

      Wanted to download Headspace but is an older version. Its not compatible with 2.9.2…

    • Salvatore
      Posted November 2, 2011 at 3:21 pm | Permalink

      I’m creating a multilingual website with wpml and all in one seo pack and I cannot change the title, descriptions and keywords in the /es /en /it homepages.
      How did you succed?
      Thanks in advance for helping.

  13. Astrid
    Posted August 17, 2010 at 10:59 pm | Permalink

    Thanks a lot for your clear explanation of WPML!

    I got one question left:

    In my website I’ve written a contact form in the sidebar area. So I would like to get a different sidebar for each language.

    How would it be possible to have all these contactforms in the same sidebar.php and get a different one shown for each language.

    Thanks in advance!

    • Posted August 18, 2010 at 8:06 am | Permalink

      This piece of code should do the trick:

      if(ICL_LANGUAGE_CODE=='en'){
      //here you output the code for the en contact form
      }
      if(ICL_LANGUAGE_CODE=='es'){
      //here you output the code for the es contact form
      }

      Hope this makes sense.

  14. Posted August 25, 2010 at 9:42 pm | Permalink

    Great read, this is exciting stuff!

  15. Posted January 27, 2011 at 1:16 pm | Permalink

    Hello,
    Thank you for this very interesting information. I would like to know if you have any video about it?
    I will try this plugin.
    Regards,
    Antonio

  16. Levi
    Posted March 4, 2011 at 2:11 pm | Permalink

    Hai, anyone knows why the second option ‘Translate the theme by WPML’ is not available?
    I only can see 2 options. Thanks in advance!

  17. crepmaster
    Posted March 24, 2011 at 1:55 pm | Permalink

    Hy yall i having a trouble with my permalink. i’m using the bamboo theme and wordpress.
    the switcher language seems to work properly but, the permalink is not associng the correct language the id is correct but the language is still on one of the 3 languages of the site…
    like …?p=98andlang=fr even if the choosen language is english.
    i must say that the title is shown correctely the header ( first lines of articles ) is shown correctely but the read all and the permalink are linking to the bad language.
    what did i miss?

  18. Annie
    Posted April 23, 2011 at 9:07 am | Permalink

    I do not know how to say to you! Thanks so much for your useful infos!Keep on and brighten yourself!
    Gardening tips

  19. Posted April 29, 2011 at 2:18 pm | Permalink

    I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make. You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me.

  20. Posted May 8, 2011 at 3:09 am | Permalink

    Hi I just like to have
    “Notify me of followup comments” here… easer to be remembered..

    I am web designer and worked with JoomlaFish some years ago.. Today I was googling for best wordpress multi language and gladly find this.
    Well I have small question but nerver mind if you don’t know by hart… i will find it…
    can I have one domain name for one language and other for other language?
    Without many guru works…

  21. Posted May 18, 2011 at 4:33 pm | Permalink

    This is fantastic, exactly what i was looking for! surprised their isn’t more plugins developed with this functionality seems like it would be in high demand!

  22. Posted August 18, 2011 at 12:11 pm | Permalink

    Hi…
    It is really an interesting post.. this will surely help us out as we run a translation service company.. Thanks for the tutorial:-)

  23. Posted September 9, 2011 at 1:39 pm | Permalink

    it looks really great, i’m gonna give it a try. thanks for the review

  24. Posted September 27, 2011 at 3:57 pm | Permalink

    It’s a long time I would like to test wpml actually. My next project will be with it. Qtranslate is interesting but issue with url…

  25. Gull
    Posted September 29, 2011 at 1:17 pm | Permalink

    hi
    i m so much confused i m using wpml all things going well but i m using some other plugins for recent post and top 3 posts but Wpml is not showing there the translated post according to Danish Language ……..have u nay idea ……………plz help me
    Kind Regards Gull

  26. Posted October 28, 2011 at 8:56 pm | Permalink

    thanx for the info…really appreciated!!!

  27. Posted November 3, 2011 at 2:14 am | Permalink

    I am new to all this and was wondering if this wpml really works well if wanting make my English site into a mirror image but in French for example???

  28. Posted January 27, 2012 at 2:05 pm | Permalink

    Thats the first time i visited this, i found many info here!
    Keep it up :)

  29. Posted May 5, 2012 at 9:32 am | Permalink

    thank for the information. sangat membantu

  30. Posted May 16, 2012 at 12:48 am | Permalink

    thanx for the info…really good!!!

10 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, [...]

  7. By In bed with Wordpress #3 | Thin:Media on December 6, 2010 at 2:01 am

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

  8. [...] Multilingual WordPress – WPML Plugin Review Relaterade inlägg :WPML Multilingual CMS Plugin | WordPress PluginsMultilingual variables | drupal.orgXili-language Plugin | WordPress PluginsWordPress plugin and widget tutorialCreate a Custom WordPress Plugin From Scratch | Nettuts+By Blogsdna [...]

  9. By Multilingual Wordpress – WPML Plugin Review on June 26, 2011 at 10:07 am

    [...] the original here: Multilingual WordPress – WPML Plugin Review Tags: using-the-wpml, [...]

  10. [...] WordPress plugin – Multilingual WordPress. WPML plugin review [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

* Copy this password

* Type or paste password here:

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>