Bunny's Language Linker: New WordPress Plugin [en]

[fr] Un nouveau plugin WordPress que je viens d'écrire. Celui-ci vous permet de gérer les liens entre pages équivalentes de deux versions linguistiques d'un site. Par exemple, si vous avez http://stephanie-booth.com/en et http://stephanie-booth.com/fr (deux installations WordPress séparées!), le plugin vous aidera à faire en sorte qu'il y ait des liens entre http://stephanie-booth.com/en/about et http://stephanie-booth.com/fr/a-propos.

Ladies and Gentlemen, I’m proud to announce the WordPress plugin Bunny’s Language Linker (zip, phps).

I’ve been wanting to write this plugin for ages, and I’ve finally done it this evening. This is a plugin for people who have a WordPress site with content duplicated in more than one language, like I’m going to have with stephanie-booth.com. For example, you have an “about” page in English, and another “about” page in German. This plugin helps you create and manage links between such “sister” pages. (“Pages”, not “posts”. It doesn’t work with posts at all.)

The plugin adds an extra field to the page editing form, inviting you to input the page slug of the sister page:

Bunny's Language Linker - Admin view

The screenshot is a bit small, but there on the right, there is a little box with “a-propos” — the slug of the French sister page. It works with more than one other language, too. You just need to edit the settings in the plugin file to specify which languages you’re playing with (instructions are in the plugin file). If I had sites in 3 other languages, say French, Spanish, and German, my settings line in the plugin file would look like this:

$bll_other_languages=array('fr', 'es', 'de');

And the little box would provide three different fields for the page slugs of the different localized sites. (OK, I’m making this sound complicated, sorry.)

The plugin then automatically adds links to the sister pages you’ve indicated. Here’s what it could look like:

Bunny's Language Linker - Page view

There’s a readme file with the plugin which will give you some more details. I’ll soon have a client site in production using that plugin, so if these explanations weren’t very clear, hopefully the demonstration will help.

20 thoughts on “Bunny's Language Linker: New WordPress Plugin [en]

  1. Good job!

    Two suggestions:

    1. Make the page selection a dropdown with available pages, not a textfield. Similar to the way the Page Parent is selected.

    2. Make the plugin work with posts too.

    With the above to points implemented, it’ll be a killer plugin for all of us having (or thinking about having) blogs in multiple languages. 🙂

  2. Hi Leonid,

    I was thinking about using a drop-down — I guess it makes more sense.

    About posts… It would only really be possible to easily implement for single post pages. And then… we bump into one of the issues with “translation blogging”: I don’t think it’s the best way to blog in more than one language. But well, if people want to translate everything they write, I guess it’s not my place to stop them, is it?

    Will keep your comments in mind for the next release.

  3. Hi!

    Nice new alternative. I actually have2 clients who indeed DO translate everything (Pages & Posts), so a post-capability would be great!

    Brava, Stephanie!

  4. You’ve been wanting to write this plugin for ages and I’ve been wanting to find a plugin like this for ages!

    Well done!

    About posts…like Leonid said it would be nice to extend it to posts too but on the other hand we need to keep in mind translation blogging issues…pretty challenging huh?! I’m sure you will come up with something in the next releases! (don’t get me wrong I really love this plugin!)

    Stephanie I wish you a successful 2008 + keep up the great work!


  5. Quick hack to make it work in posts, too (but be careful, you will have to copy-paste everything after the en/ or fr/ — including the date — for example, “archives/2007/12/28/bunnys-language-linker-new-wordpress-plugin/” for this post). Add the following code at the end of the plugin somewhere:

    add_action('dbx_post_sidebar', 'bll_add_slug_boxes');
  6. I’m interested in developing a way to use display:block to provide bilingual content on the same page in wordpress. A cookie setting indicating language chosen would activate the area that contains content in the chosen language.

    It is easy to do this on a web page, but within wordpress, it is a challenge, I think. Have you ever considered this multilingual approach before?

  7. I’ve been using the plugin for a quite a while now and really like it, but I was wondering if there is a way to manually disable it in a single post. I have a couple of posts here and there that I’d like to disable the button on, but I want to keep them on the rest of the posts. Is there a tag I can add to suppress it?

  8. Hi Stephanie nice idea of a plugin. I have never needed it until now and plan to use it, but I’m a bit concern regarding compatibility with recent changes. Here’s my concern:

    1. I noticed you are using Thesis theme but I wonder if you are running (or have tested compatibility with ) 1.7 version?

    2. What about WordPress 3.0?

    I’m currently setting up that scenario WP3.0 + Thesis1.7 and can’t find where to set sister’s page.

Leave a Reply

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