Multilingual WP – making multilingual WordPress easy

This plugin is still in development, but soon it will hopefully see the world through the WordPress.org plugins repository – stay tuned for that!

The problem

Do you use/Have you used qTranslate in order to make your WordPress site available in multiple languages? If you do, then I guess you’ve experienced the breakages that occurred a couple of times in the last year – the reason is that the developer simply doesn’t have enough time to fix those issues on time. I’m not blaming him for that – as a developer myself I do understand that sometimes it’s hard to find spare time to go out with your friends, let alone to fix issues in a free open-source project.

I – just like you use qTranslate(well, to be honest I even used it in most of my work projects ) and I tried multiple times to make patches for the plugin in order to get it to work with the latest version of WordPress. But the problem is that the plugin itself has been designed pretty poorly and improving it/fixing it would take quite a lot of time – actually the author himself had the idea of completely rewriting the plugin, but he never got to that point.

The solution

So, I decided to write my own plugin, that would only use/or extend/ built-in WordPress functionality in order to provide multilingual support. The reason for this is that it will make maintaining the plugin a whole lot easier and much more compatible with future versions of WordPress.

How does it work

Here’s a quick overview on how the plugin works:

  • You select which post types(posts, pages, custom post types) you want to make multilingual
  • You select the languages that you want to have enabled(you’ll probably have to create them first though)
  • You run the automatic post updater that creates a new post for every language that you enable(yes, including the default language)
    • So if you have 3 posts and 2 languages enabled, you will end-up with a total of 9 posts in your database(you will still only see 3 in your admin page though). I decided to make an additional post for the default language in order to make changing the default language more hassle-free.
    • You’re not obligated to run the updater, but unless you go to the edit screen for each post, the translation posts will not be created.
  •  The original post has a one-to-many connection with all of the translation post via a custom post meta called _mlwp_langs
  • Each translation post has a one-to-one connection with the original post via a custom post meta called _mlwp_rel_post
  • On the edit screen a button for each language is added above the title/content sections:
    mlwp-post-edit
    This ensures the best(in my opinion) compatibility with WordPress and other plugins, because:

    • It uses a built-in WordPress function
    • Because of the above doesn’t require any hack-arounds in order to get/set the content
  • Because every translation is a separate post, you get different slugs for each language – out of the box This is done by adding a bunch of rewrite rules to the ones generated by WordPress. Yet another possible performance issue with bigger sites.
  • Because all of the posts are edited from one screen, you don’t get different custom meta for every translation – instead any custom fields that you might have are connected to the original post – you can still use quicktags or translation shortcodes in order to translate your content.

For the latest information about the plugin and downloading the source code, please visit the page on GitHub

17 thoughts on “Multilingual WP

  1. Hi Nikola,

    Great plugin you’ve built. Only thing I can’t find is how to implement the language switcher on my website. Can you tell me how to do this?

    Cheers,
    Hans

  2. Hi Hans,

    Simply add the “Language Switcher” widget to a sidebar of your choice. If you don’t want to display it in a sidebar, then add this code to any of your theme files:

    <?php mlwp_lang_switcher(); ?>

    This will build the default language switcher – which is an unordered list with flags.

    More info on the options that you can pass as an array can be found here – https://github.com/nikolov-tmw/multilingual-wp/blob/master/plugin.php#L1866

  3. Hello,
    thanks for good plugin.
    I have strange problem – when the plugin is activated, it breaks site menu (maybe conflict with Headway theme).
    Is it known problem and maybe there is any way to fix it?

    Thanks.

  4. Hello
    how can i translate the menu using this plugin.

  5. Do you have “the fulle language code” using for coding in your plugin like ” ” of Qtranslate. I need for design the private menu!
    Example, with Qtranslate, I can write this for my menu (I use test widget):

    <a href= “domainsite/trang-chu/” “domainsite/en/home/” > Trang chủ Home

    <a href= “domainsite/trang-chu1/” “domainsite/en/home1/” > Trang chủ 1 Home 1

  6. Sorry, I don’t want to spam, but the code is hidden…
    Do you have “the fulle language code” using for coding in your plugin like ( ) of Qtranslate. I need for design the private menu!
    Example, with Qtranslate, I can write this for my menu (I use text widget):

    <a href= “domainsite/trang-chu/” “http://demo.vipassana.vn/en/home/” > Trang chủ Home

    <a href= “domainsite/trang-chu1/” “http://demo.vipassana.vn/en/home1/” > Trang chủ 1 Home 1

    • Hi Nhat Hien,

      I understand what you’re trying to do and here’s how you can accomplish that with my plugin(using a Text Widget):

      [vi]<a href="domainsite/trang-chu/">Trang chủ</a>
      
      <a href="domainsite/trang-chu1/">Trang chủ 1</a>[/vi]
      [en]<a href="http://demo.vipassana.vn/en/home/"Home</a>
      
      <a href="http://demo.vipassana.vn/en/home1/">Home 1</a>[/en]

      OR:

      [:vi]<a href="domainsite/trang-chu/">Trang chủ</a>
      
      <a href="domainsite/trang-chu1/">Trang chủ 1</a>
      [:en]<a href="http://demo.vipassana.vn/en/home/"Home</a>
      
      <a href="http://demo.vipassana.vn/en/home1/">Home 1</a>

      Both of these options will work – the difference is just your preference of whether to use shortcodes( “[vi][/vi]” ) or quicktags( “[:vi]” ).

      Hope that helps,
      Nikola Nikolov

      PS: Sorry for the late reply

  7. Hiu Nikola,

    Excellent plugin you made there! Congratz!

    However, is there a way to import previous qTranslate content into it or should everything be done from scratch?

    If no, is there a plan to implement it?

    Cheers,
    João

    • Hi João,

      Currently you can migrate your content from qTranslate to my plugin. All you have to do is go visit the Multilingual WP > Fix Posts and click on the “Update all of my terms” and then “Update all of my posts”(after the terms update completes).
      Note, that you need to still have qTranslate enabled for that to work. You will also need to have all of the languages that you’ve used in qTranslate added to my plugin and enabled(if the plugin finds content for a language that is not enabled, it will discard it!).

      Also please note that the plugin still has some issues – so if you ever decide to use it on your live site, make a back-up of your database(there are a bunch of plugins out there that you can use for that – just search for one). Generally nothing wrong should happen to your content, but it’s good to be safe first

      I hope that helps,
      Nikola

  8. Hi Nikola,

    We started to use your “Multilingual WP” for most of the above reasons. However since last evening posts don’t save anymore, ok they do save but after saving the only remaining item on the page is the Featured image. We are on WP 3.7.1. I hope you can help on this.

    • Hi Jelmer,

      I’m glad that you’re using the plugin and I’m sorry to hear that you’re having issues. Can you email me at nikolov[dot]tmw[at]gmail[dot]com , so that we can have a more in-depth conversation there.

      • Zdrasti Nikola,

        I’m dreadfully sorry, the not saving apparently had nothing to do with your plugin. It runs smooth again just as when I freshly installed it.
        I really love it.

        You have another site life with it.

        I’ll send you anyway email though.

        Pozdravi,

        Jelmer

  9. Hello Nikola,

    Sorry of being “that guy” but is there any news on this project? Is it abandoned or on pause or something else?

    Other than that, great stuff! And I hope you continue to support this great plugin. Can’t wait to see it live!

    Cheers,
    João

    • Hi João,

      Don’t worry about asking questions – that’s always important! I might actually write a blog post this days with a status update if I end-up having the time for that.

      Currently the project is on pause – I’ve had a lot of stuff happen in both my personal and professional life, which left me with no free time to work on my plugin. I was really hoping to fully release it for WordPress 3.9, but that didn’t happen

      Unfortunately I have no idea when things are going to settle-in and I’ll be able to re-schedule my time to allow me to work on the plugin.

      Right now the plugin is generally working(I’m using it here ), but it definitely has some quirks and issues here and there that will not allow me to publish it for everyone to install.

      All the best,
      Nikola

      • Thank you so much for your answer.

        Could you elaborate on the “quirks and issues here and there” ?

        I’m a bit wary of installing your plugin on a live site without knowing the side effects, but on the other hand, it’s the better alternative so far

        Again, thanks

Leave a Reply to darowiche Cancel reply

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