xLanguage (Wordpress Plugin)

Monday, January 21st, 2008 Chinese Cantonese

A WordPress plugin that allows you to blog in multi-language, and users to select which to read. If your want to localize and present your blog in different languages (totally with title, rss, categories working, not just the post) and allows visitors to pick the language they want, this plugin is for you.

xLanguage allows you to blog in different language, and allows user to select which version to read. It works for blog post, page, tags, categories. The user language preferences will also select the right theme and plugins MO files.

Customization is the No. 1 design goal, after all that’s probably the reason why you want to setup a multilingual blog. The language configuration combination is highly customizable to facilitate multiple fallbacks. Every UI is extracted out, which could be optionally overridden by theme design without touching the plugin file at all.

This plugin works by inserting W3C standardized <span lang=”..”> tag in the post content, and a XML parser will be involved to extract them when served, extracting all elements with the matching lang=”..” tag. The permalinks and RSS feeds are also presented correctly. For single line data such as post title, a special but simple syntax is introduced.

The language preference is detected from browser’s preferences, as well as from Cookie if user visited before. Widget and template functions are also provided to allow user to switch the language easily.

Please read on for the installation, complete usage guide, screenshots, comparisons and known problems. If you found this plugin useful, please consider supporting it.

Please feel free to let me know if you need additional template functions, or if you have any idea that could make this a even better plugins for you.

Notice

If you hit the following error message after installation:

can not redeclare class xLanugagePlugin on line 996 in xlanguage.php

Resetting the xLanguage configuration would help. To do that, please go to “Settings -> xLanguage -> Options” in the Admin control panel, Scroll to the very bottom and reset it.

This is a known problem but I can never reproduce this so have no idea how to fix it. Any volunteer in helping me is very welcome!

Change Log

v2.0.1 (r84024)

  • New features: Now you can hide those post written in foreign that reader can’t read. See the updated user guide in the next few pages.
  • Now it’s easier to put the flag icons! See the updated user guide in the next few pages.
  • Support Wordpress 2.7.0

v1.3.3 (r44242)

  • #9 is regressed causing xLanguage installation dead on arrival. Now fixed together with #10.
  • This new version should solve the v1.3.2 installation problem.

v1.3.2 (r44032)

  • #9 is fixed - xLanguage should be usable in WP-MU now.

v1.3.1(r43326)

  • #8 is fixed - The static homepage bug introduced in v1.3.0.

v1.3.0 (r42456)

  • New feature #4 is implemented. In addition, to http://example.com/page/something/lang/en, now it could be http://example.com/lang/en/page/something.
  • No other bug is fixed.

Licensing

CC-GNU GPL

This plugin by Sam Wong is licensed under the CC-GNU GPL.

Latest news available in category xLanguage (WordPress)

358 Responses to “xLanguage (Wordpress Plugin)”

Pages: [15] 14 13 12 11 10 9 8 7 6 51 » Show All

  1. 358
    Mariano Says:

    Hello Dear Sam,

    Please don’t forget about me… I’m still struggling with the _ES -es thing (see comment #348 above). Is there something I can do to help solving this? I’ve seen some people having the same problem.

    THANKS A MILLION!

  2. 357
    Hallvord R. M. Steen Says:

    Ops. Sorry, didn’t read the text about allowed tags. Feel free to edit the comment so that the stray <A HREF=”/lang/en”> tag no longer makes your markup invalid..

  3. 356
    Hallvord R. M. Steen Says:

    Hi Sam,
    I’ve noticed a problem after upgrading to WP 2.7 and unfortunately xLanguage 2.0.1 doesn’t solve it: on my blog front page I have links to the various language versions ( et cetera) and clicking them now says 404 not found!

    A workaround was to go to xLanguage’s preferences and change permalink style from prefixing to postfixing. For me it’s not really a big issue. However, due to the warning about postfixing not working with paged comments and other plugins, and because other users upgrading will likely see this I thought you would like to know..

  4. 355
    Yogie Says:

    Ooops, writing my mail and seeing your mail again I figured out that I have to rename my files to de-de.png, de-de-active.png sorry etc. now it works thanks!

  5. 354
    HelloSam Says:

    Andy: sorry I (half accidentally half intentionally) changed the default template.
    Please use the old template to restore the previous look and feel.
    The template of the previous version could be downloaded at http://plugins.trac.wordpress.org/browser/xlanguage/tags/1.3.3/view/xlanguage
    Put it (other_post_lang.php) into /wp-content/themes/_YOUR_THEME_/view/language (create the folder as needed)

    Louis: Removing the /lang/ this is not possible just yet. Stay tuned.

    Yogie: Please do me a flavor in checking a few things. 1. The filename is correct, “xx” is corresponding to your language code, and it is CASE Sensitive. 2. The files are uploaded with correct permission. For example, here is my files structure under /themes/.
    hellosam1/view/xlanguage/images
    hellosam1/view/xlanguage/images/en-active.png
    hellosam1/view/xlanguage/images/en.png
    hellosam1/view/xlanguage/images/zh-active.png
    hellosam1/view/xlanguage/images/zh-hk.png
    hellosam1/view/xlanguage/images/zh.png
    hellosam1/view/xlanguage/images/zh-hk-active.png

  6. 353
    Louis Says:

    Hello,
    First, thanks for for this good and really extensive plugin !
    I’d like to know how I can delete le word “lang” in my url,
    to have this
    http://www.example.com/fr/date/post
    instead of this
    http://www.example.com/lang/fr/date/post

    Thanks

  7. 352
    Yogie Says:

    Well to me simply adding the xx.png and xx-active.png files will not work :-(

    I added them into /wp-content/themes/”mytheme”/view/xlanguage/images/ and also into the plugin folder - No Success!

  8. 351
    Andy Says:

    Hi again.

    I have had a bit of time to re-read your new instructions for installation and have discovered that I had to recreate the view/images folder inside my theme. This now works to show the flags (but the flags only) whereas before it showed “[flag] Other language name” etc.

    Where can I add the code so I can show the language name and the flag?

    thanks,
    Andy

Pages: [15] 14 13 12 11 10 9 8 7 6 51 » Show All

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting