2006年12月26日 星期二

WP Plugin: Polyglot

[lang_zh]
使用 Polyglot plug-in,獲得多國語言支援 :D

把 blog 換成 wp之前,我的 Blosxom 有 Blosxom::MultiView 支援多國語言。不過之前換成 wp 時並沒有順便把英文版也 import 過來。Survey 了一下相關 plug-in,我發現 Polyglot 還滿強大而且又好用的,所以就把之前的舊文章 merge 進來了。

使用 Polyglot 時,文章裡面可以用 [lang_en}(括號要對稱,這邊只是為了說明,要讓它認不出來)來區別語言,有興趣直接看官方網頁比較清楚。而只要在 url 後面加上 /lang/en/ 就會變成英文版;如果是 /lang-pref/en/ 就會把"習慣"存到 cookie 裡面。除了文章本身,title、comment、甚至是 category 也都可以改。

英文版也有 feed: http://feeds.feedburner.com/VictorsBlogEnglish,不過我猜沒人會看啦 :p
[/lang_zh]

[lang_en]
Here comes my multilingual blog, with help from Polyglot plug-in!

Before moving blog to wp, my Blosxom used to support multi-language with my plug-in called Blosxom::MultiView. However, I didn't move those English posts here that time. Today, I found Polyglot is just suitable for me, either in funtionality and usability. Now, I got more chance to practice my English :P

With Polyglot , you can write [lang_en} (actually it's "[]") for English version in the post. Not only post itself, title, comment, and even category can be multilingual. Appending "/lang/en/" to the post's url will show the English version, if you append "/lang-pref/en/", your behavior will be stored in your cookie.


English version feed: http://feeds.feedburner.com/VictorsBlogEnglish
[/lang_en]

沒有留言: