Tuesday, April 14, 2009

The Struggle of Creating a Multi-lingual Web Site | 開發多語言網站的困擾

IT is a terrible mistake of using GoDaddy Java web hosting feature. The php / MySQL combination has nothing wrong, but the Java part…just simply forget it. It’s a self-torturing.

This web site consists of three parts:
- DMS-like Framework with user Management
- Forum, and
- Blog

Java is the obvious choice of the development language as Unicode is the de facto standard in Java. Writing the JSP/ Servlet/ Taglib/ SQL for the DMS-framework is relatively trivial, comparing to the integration for the other components:

Forum – I use the JForum, a Java-based, phpbb-like, FREE, OPEN-SOURCED forum package. The reason I relutanted to choose this package initially will be described in the another blog. Anyway, one of the decision factor of using JForum is the result of the failure of integrating “BBPress” in a month of time. I know phpbb3 is pretty good and stable, but it doesn’t provide on-the-fly language change. I’d tried to hack the package in order to do that, and I lost in the sea of ill-structure php code after a couple of day. So I skipped this one once and for all.

BBPress, a PHP package sharing the code base with the popular bloging package WordPress, is pretty neat and light-weight. It cannot do the on-the-fly language change, but it’s not difficult to hack to make it works. I did changed the package and looked good to me. However I found another challenge ahead: the single-sign on between the Web framework and the forum.

WordPress is used for blogging part. I used WordPress about 4 years ago when I first designed my own personal site. After years of development and enhancement, this package is very nicely done, feature-rich, secure and stable. After days of hacking bbPress, I just found out customizing WordPress was just a breeze since these two packages share a lot in common. I spent a day in changing the look-and-feel, then it is the look that you’re looking at right now.

=================================================================

GoDaddy 網站提供的Java服務是一種自找煩惱的愚蠢自虐行為。為什麼我知道?因為我自虐了兩個月。

這網站由三個部份組成:
網上文件處理系統
論壇
部落格
由於以Unicode為核心,用Java就已經是不二之選。以Java的網站編寫組合:JSP/Servlet/Taglib 再加上以Oracle為數據庫,對我來說編寫是得心應手。而最花時間的地方反而在各部份整合方面。

論壇 --以php為主的論壇可以說是成熟而且繁多。免費的如phpBB, bbPress等都是有大量用戶的好作品。不過,此兩個論壇都不能辦到即時語言轉換的工能。雖然我花了一個月時間最終把bbPress改致同步多語,亦把外觀改致和主網站相同,不過最後亦逃不過放棄的厄運--因為在用戶同步登錄部份難以整合。所以最後由JForum取而代之。

部落格 --花了不少時間在改bbPress,所以要改它的兄長「WordPress」,已經是易如反掌。因為部落格不雖和主網站做用戶用步,因此花了一天時間把外觀調好,就可和主網站整合了。

No comments :