xLanguage (Wordpress Plugin)
Monday, January 21st, 2008
Contents
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
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
This plugin by Sam Wong is licensed under the CC-GNU GPL.

































































English
September 29th, 2008 at 20:54
Thank you, thats great…
September 28th, 2008 at 13:51
Hi, thanks for this great plugin.
I worked for me on windows when developing the blog, but when I move it to the linux server I got this error:
"Fatal error: Cannot redeclare class xLanguagePlugin in /var/www/wp/wp-content/plugins/xlanguage/xlanguage.php on line 996"
Any idea why this is happening, I read some other comments and is the same problem.
I’m using wp 2.6.2 on ubuntu php. 5.2.4 with Suhosin-Patch 0.9.6.2
September 27th, 2008 at 17:44
[...] di qualcosa di più versatile e meno pesante è stata lunga, ed alla fine ci siamo indirizzati su xLanguage di Sam Wong, un plugin con maggiori funzionalità, che offre la possibilità al visitatore di [...]
September 26th, 2008 at 3:19
Hello from Bavaria,
I have a problem with widgets and xLanguage.
The plugin works fine so far with categories, pages, posts and the widget you provided for switching the languages.
Problem: it does NOT work with the other widgets (like Category, Pages, Text …all standard as far as i know…).
Any idea or hint were to check for misconfiguration or error or db-problem or …???
(I am still using WP 2.5.1 and this one is installed on a mySQL 4.x db, in this case the terrafirma-template 3.5 and some other nice plugins like the TinyMCE adv.)
Thanks in advance!
Pete
September 25th, 2008 at 19:57
I’m using this great plugin but I found conflict with other plugin which uses pagination.
For sample : i have a glossary page (using IMM-Glossary) in this url (for sample) :
http://www.mydomain.com/glossary/lang/en/. When i click the second page, its 404 error because the browser opening :http://www.mydomain.com/glossary/lang/enKey/2/. Its supposed to be openinghttp://www.mydomain.com/glossary/Key/2/lang/ento show correctly. Please help because I have no idea whats code must be tweak to fix this problem. This problem also found if I using FAQ-Tastic and EZ-FAQ plugin thx n regards,September 24th, 2008 at 2:07
Greetings, this is a great plugin, I will make a donation once I have it running because It really helps me out!
The problem is that everything works, except the content. The titles, tags and categories, all are translated, but the content of the post is displayed in both languages simultaneously, one is tagged as english and the other as spanish (en, es), and it makes no difference.
I Run WPmu 2.6.1 ans xLanguage 1.3.3 with K2 RC3 I really need urgent help. I tried 569 and r669
Thank you
September 24th, 2008 at 0:02
Hi Sam, I live in HK and want to write my blog in both eng and chinese
I am very happy to find this plugin.
However I have a installation problem
my WP version is 2.6.2
xLanguage version is 1.3.3
once I actived the xLanguage in admin page
it said:
Fatal error: Cannot redeclare class xlanguagepluginbase in /home/dsilentcom/domains/d-silent.com/public_html/blog/wp-content/plugins/xlanguage/plugin.php on line 103
is it a reason I installed “qTranslate ” before?
September 18th, 2008 at 14:41
Hi, I found your blog on this new directory of WordPress Blogs at blackhatbootcamp.com/listofwordpressblogs. I dont know how your blog came up, must have been a typo, i duno. Anyways, I just clicked it and here I am. Your blog looks good. Have a nice day. James.
September 17th, 2008 at 21:50
Hello,
I am trying to use this wonderful xLanguage plugin. Everything is
working very well, except that I don’t find a way to use the filter hook
in the sidebar H2 heading (no widgets!).
Any help or a direction where to look would be greatly appreciated.
The code:
<ul class="submenu ">
Novinky | News
<a href="">
Thanks
Goofy
September 16th, 2008 at 20:15
I learned much from your post. Thank you.