Friday, March 04, 2005

How to enable OpenVanilla input method framework and use the contained Tibetan Input Method

Mike left a comments in the blog entry entitled as ‘The OpenVanilla Tibetan Input Method’. He mentioned about that the documents in English and in other languages are still not available and it makes much difficult for non-Chinese speaking people to use such a software.

You know, OpenVanilla is a Input Method Framework programed by native Chinese developers and for Chinese users. It’s not popular to develop open source software in Taiwan and we have limited resources on this project, and it seem that developing a Input Method framework is quite a ‘local’ subject to make us obtain international helps; It’s quite hard for us to write a well-documented English manuel after writing a Chinese version which consists about 30 to 40 pages, and it‘s not unusual for us to promote this project to the Chinese friends besides us as our first step.

However, I think an English explanation to introduce how to use such a software is still requires, but I can only give a brief explanation this time.

OpenVanilla requires Mac OS X 10.3 panther, it’s not compatible with previous releases of Mac OS X and classical Mac OS. To install it, just download the installer package of the very last release (version 0.6.3) from here, click on the icon of the package. Then, Mac OS X will ask you to restart your computer in order to reload all system components. The administrator permission is required, too; You maybe asked to input your administrator password.

Then, visit the ‚‘International’ preference pane in the System Preference application, click on the ‚‘Input Menu’ tab, you will find there is a box listing all keyboard layouts and Asian input methods. Go find the item named ‚‘OpenVanilla 0.6.3’, click on the check box to enable it, you can use OpenVanilla now.

Internaional prefpane

By the way, it’s recommended to enable the option named as ‘Show input menu in menu bar’. I guess most Western users would like to disable this option because they just need to use one Western keyboard layout, however, Asian users such as Chinese, Japanese and Korean always keep this option on, because they always need to input not only Western letters but also characters in their own languages. After enabling this option, you will see an icon appear on the top-right corner of your screen, click on the icon, then you can switch to another keyboard layout or input method. You can switch keyboard layouts and input methods by pressing option key (⌥), command key (⌘) and space key in the same time, too.

After switching to OpenVanilla, you can see there are varied Chinese input methods listed in the input menu, you can ignore them since you do not have needs to input Chinese but Tibetan characters, just select the item names ‘OV Tibetan’. Launch any text ditor such as TextEdit.app, try to type something, and you will see, it works.

OpenVailla Tibetan supports four Tibetan keyboard layouts; Sambhota Keymap one, Sambhota Keymap two, TCC Keyboard One and TCC Keyboard Two are included. You can switch these keyboard layouts from the OpenVanilla preference pane. All these keyboard layouts are illustrated in the Chinese manuel, in page 14 to page 20. I think users might read these pages, just becuase I do not think reading these pages does require ability to read Chinese, and there are always some problem on rendering Tibetan characters on web pages, it makes hard for me to illustrate these keyboard layouts on this blog site.

By the way, to proccess Tibetan characters, not only input methods but also fonts are required. The glymphs of Tibetan characters are include in the Simplified Chinese fonts packaged in the Simpified Chinese locale package of Mac OS X. To install this package, please use your own Mac OS X installation CDS bundled with your Macintosh computer.

Monday, January 24, 2005

The OpenVanilla Tibetan Input Method

I and some friends release OpenVanilla 0.6.3 containing a tibetan input method last week. OpenVanilla is a Chinese input method framework that can dynamically load each input method modules as dynamic libraries and it supports dozens of input method modules now. Saying it’s a Chinese input method is because of the limit of the design of Mac OS X, however, it support inputing any Unicode characters indeed but not only Chinese characters. You can download OpenVanilla here.

The Tibetan input method module contained supports four keyboard layouts, Sambhota Keymap One, Sambhota Keymap Two, TCC (Tibetan Computer Company) Keyboard #1 and TCC Keyboard #2 are included, you can switch the keyboard layouts from the Preference Pane of OpenVanilla. I began to work on this module since the last Christmas Eve because some friends knew we were working on input method programming for Mac OS X, and asked that if we can develop a Tibetan input method, I did a try and it worked, and friends are happy with it. I hpoe this module could be useful for you, too.

The OpenVanilla Tibetan input module does not support Wylie Transcript System yet, and I do not have any plan to work on it yet. However, if you are familiar with Wylie keyboard and you want to use it on Mac OS X, I suggest that you should try another free open source software, MacUIM. MacUIM is a Japanese input method framework for Mac OS X and it support the works of m17n.org, and Wylie keyboard is included. Just download the latest release of MacUIM, install it and select “m17n-bo-wylie” from the menu.

I guess the most comprehensive collection of Tibetan input should be in the Internet should be on the webpage of THDL, the Tibetan and Himalayan Digital Library. However, the informations listed are most about Tibetan input in the Microsoft Windows platform but lacked in Mac OS X and other operating systems.

Mac OS X is an outstanding operating system for process multi-lingua texts, and so on Tibetan. The glyphs of Tibetan characters are included in the fonts of Simplified Chinese, and the text display engine can display Tibetan stacking perfectly. And now, by using the Tibetan input method contained in Openvanilla or MacUIM, or the Dzongkha keyboard I mentioned in the latest blog entry, I think that you can happily process Tibetan input with your Macintosh computer.

By the way, JSKAD, the Tibetan text editor and another Tibetan-English dictionary offered by HLDS are written in Java, they can run on Mac OS X and very useful, too.

I will keep on working on this module, and any suggestions or comments are welcome.

Create a keyboard layout for Mac OS X

This blog entry is a translated text of the previous post.

While I worked on the Tibetan Input Method under the OpenVanilla Input Method Framework, I noticed that the Department of Information Technology of Bhutan released a standard Dzongkha keyboard layout for Windows Operating System last year, you can see the detail in this document: Technology Standards and Resources for Computing in Dzongkha(PDF).

Dzonghka is the language used in Bhutan and it’s similar with Tibetan. Besides I created the Sambhota and TCC keyboard layout in the OpenVanilla Tibetan input method, I think if there is a Dzongkha keyboard layouts for Mac OS X, it should be useful. However, I did not see any information about Dzongkha keyboard layout for Mac OS X, therefore I made one by my self.

To create a new, customized keyboard layout in Mac OS X is easy. Since Mac OS X 10.2 Jaguar is released, the keyboard layouts are design as a UTF-8 encoded plain text XML file. What you need to do is to select a existing keyboard layout, copy it, rename it, edit it and save it. After re-login into the system, launch the System Preference application, you will see your new keyboard layout appears in the Input Menu tab in the International Preference Pane. That’s just so easy. You can read the further detail in this document by Apple : Technical Note TN2056: Installable Keyboard Layouts.

However, it’s still a little bit annoying to know about the meaning of each XML tag. You can try some graphical keyboard layout editors such as Ukelele. While using Ukelele, there will be a graphical keyboard appear in the screen, click on the keycaps on the keyboard, you will be able to input the mapping characters of these keys. Or, you can launch the Characters Palette from the Input Menu, then drag the Unicode characters from the Characters Palette to the graphical keyboard in Ukelele.

After finishing editing, please put your XML file into /Library/KeyboardLayouts or ~/Library/KeyboardLayouts. If yoiu need to set a icon for this keyboard layout, you should put your XML into a bundle, and then put the bundle into the directories that I mentioned. The way of how to build a bundle is listed in Technical Note 2056, too.

In the final, I want to say that you can download my Dzongkha keyboard layout from the download area of the OpenVanilla Tibetan Input project hosted in the OpenFoundry. Please click here.

設計 Mac OS X 鍵盤

在製作 OpenVanilla 的藏文輸入法的時候,我也注意到除了Sambhota、TCC以及EWTS等THDL支援藏文輸入法之外,另外還有一種可以輸入藏文字母的鍵盤配置,叫做 Dzongkha。

Dzongkha 中文翻譯成宗卡語,是不丹的國語,是一種接近於藏文的語言,使用的也是藏文字母,而不丹政府的資訊部在去年十一月的時候,也指定了標準的Dzongkha鍵盤規格,可以參見Technology Standards and Resources for Computing in Dzongkha這份PDF文件,在網站上,也提供了供Windows作業系統的輸入軟體以及字體。不過,不丹官方並沒有提供給 Mac OS X 使用的版本,所以我就自己做了一個。

dzongkha keyboard

而其實在 Mac OS X 中,要製作一個輸入鍵盤可說是相當容易的。雖然說要開發中、日、韓等比較複雜的輸入法(Input methods)來說,蘋果的文件實在有一些老舊,而且許多技術並沒有提供完整文件,而有許多麻煩的地方,但是要製作一套按下什麼按鍵,就送出什麼字碼的「鍵盤」(Keyboard Layout),其實是相當容易的。

根據蘋果的技術文件:Technical Note TN2056: Installable Keyboard Layouts的說明,從Mac OS X 10.2版之後,就可以使用各種UTF-8編碼的純文字的 XML 表格,設計鍵盤;也就是,如果您想要一個專屬自己的鍵盤設計,您可以把系統內建的各種鍵盤配置抓出來,改個名字、改一下內容、換個圖示,存檔,然後重新登入系統,就可以在系統偏好設定中的「國際設定」(International )當中的「輸入法選單」(Input Menu)中,看到您剛剛所設計的鍵盤了。而完整的XML規格,也可以在上述的技術文件中找到。

不過,要一一搞清楚每個 XML 標籤的意思,還是有一些麻煩,所以在國外也有人開發出圖形介面的鍵盤編輯工具,例如Ukelele。在使用Ukelele的時候,會出現一個鍵盤的畫面,您只需要點選鍵盤按鈕,就可以修改按鍵的定義,或是,還有更方便的方法,您可以叫出「字元面板」(Character Palette),然後將字碼從字元面板上,拖到Ukelele的鍵盤按鍵上即可。

然後,您只要把這個XML檔案放在/Library/KeyboardLayouts裡頭,或是~/Library/KeyboardLayouts即可。而如果您需要使用在輸入選單當中的圖示,以及在輸入選單中將這個鍵盤配置的顯示名稱,在各種不同語系下,以不同的語文顯示的話,就需要將XML放到Bundle結構當中。關於Bundle結構的說明,請參見前述的技術文件TN2056。而我所做的Dzongkha鍵盤,可以從這裡下載。