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.
這個WordPress plugin使你能夠用多種語文來寫Blog,同時讓讀者選最適合的語文版本來看。若你想完全將你的Blog本地化成多種語文,這個Plugin應該能應付閣下的要求。
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.
xLanguage使你能夠在以多種語言來寫Blog,同時讓讀者選擇他們想看的語言版本。這Plugin的功能可應用在Blog post、頁面、標籤、分類等等。讀者的選擇亦會對MO翻譯檔有效。
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.
這Plugin是以高度自訂化為設計大前題,歸根究底,閣下想架起一個多語Blog為的大概都是想給讀者一個度身訂造的環境吧?所以,語文設定的彈性是超高的,可容許不同語言交叉重疊。所有使用者介面的部份都已獨立出來,可通過Theme檔來直接重載,而絲毫不動Plugin檔。
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.
本Plugin的工作原理是利用W3C標準的<span lang=”..”>標籤把不同語言的段落標籤好,被存取時則利用XML parser按讀者需要的取出來。這Plugin也照顧到Permalinks和RSS feed。至於單行的資料例來Post的標題等等,只需利用一個簡單的方式改寫就可以實現多語功能。
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.
讀者的語言偏好是首先從瀏覽器設定測出來,繼而透過Cookie保存。本Plugin也提供了Widget和Template函數,方便讀者轉換顯示語言。
Please read on for the installation, complete usage guide, screenshots, comparisons and known problems. If you found this plugin useful, please consider supporting it.
這繼續參閱安裝程序、使用手冊、畫面截圖、同類比較和己知問題。若你覺得這個Plugin有用的話,請考慮支持一下吧。
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.
若你有想要的Template functions,或者有任何可以改進本Plugin的想法的話,請不要客氣,盡情提出吧!
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.4 (r124177)
- A better handling logic about the parser log file failover.
- Updated robot list – code merged from the WassUp 1.7.1
- No need to upgrade if your installation has been working perfectly, although upgrading might bring SEO benefits as the search engine list has been updated.
v2.0.3 (r105104)
- A bug that causing infinity redirection loop is fixed (#23)
No need to upgrade if your installation is working perfectly. If you gave a try before and found that the URL generated does not work or causing infinity loop, please give another try with this.
v2.0.2 (r92141)
- Critical bug fixed: The SQL in get_pages_in_current_lang() is invalid (#22)
Please upgrade if your theme used get_pages() function.
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
This plugin by Sam Wong is licensed under the CC-GNU GPL.

































































February 9th, 2010 at 3:00
[...] fois trouver, il me fallait un plug-in pour avoir un site bilingue, parmi la multitude de choix, xLanguage a retenu mon attention, notamment car il permet de traduire les menus et les titres en plus des [...]
February 8th, 2010 at 1:29
I cannot upload the widget to my navbar … it simply will not accept it … any idea why?
February 7th, 2010 at 22:46
This plugin works by inserting W3C standardized 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.