Thursday, June 1, 2006

(XBMC) 語言碼的「本土化」

剛做了一件有點無聊的事……

我 以前有修改過mplayer目錄下的ISO639-1.xml和ISO639-2.xml這兩個檔,這兩個 檔裡放的是語言碼的縮寫和全名的對照表, ISO639-1.xml放的是兩位縮寫(如en),而ISO639-2.xml放的是三位縮寫(eng)。剛開始,是因為從射手網找來的字幕檔,常以 cht和chs來代表繁體中文和簡體中文,而這兩種縮寫在ISO639-2.xml中並沒有設定,以致在XBMC的OSD裡要選字幕時,只能看到cht, 而不能看到完整的如Traditional Chinese的全名。我加入的設定如下:


<code><short>cht</short><long>Traditional Chinese</long></code>

結果如下圖:

後來又覺得Traditonal Chinese不夠酷,於是我又改變了ISO639-2的編碼方式為big5,把Traidional Chinese改為「繁體中文」,連帶的連ISO639-1裡的某些常見語言,也一併改了中文,如「英文」、「日文」等。

在XBMC桌面顯示全面改為UTF-8之後,可玩的就更多了,因為語言碼的全名可以用各語言的「本土化」語言顯現。例如chs就設成「简体中文」,而韓文的縮寫ko,就設成「한국어」。 前一陣子,XBMC進行XboxMediaCenter.xml的大改版,把很多設定都放到AdvancedSettings.xml裡,而這個語言碼的 設定也變成可以外加到這個檔裡(ISO639-1.xml和ISO639-2.xml仍然存在)。我剛才把外加的那些語言碼設定加到 AdvancedSettings的同時,忽然覺得這樣還不夠有趣,於是找了一大堆本土化的名稱,重新改寫了ISO639-1.xml檔,除了原先設定的英文名之外,另外加入俄文、希伯來文、阿拉伯文、越南文、希臘文、印度文……反正大概想得到的,我都加進去了,雖然我也知道那些語文用到的機率是等於零。反正我開頭就說了,這是很無聊的東西。

這是韓文(請看字幕欄):


這是泰文:


我的ISO639-1.xml的語言碼設定如下:

<languagecodes>

<code><short>cc</short><long>Closed Caption</long></code>

<code><short>aa</short><long>Afar</long></code>

<code><short>ab</short><long>Abkhazian</long></code>

<code><short>af</short><long>Afrikaans (Afrikaans)</long></code>

<code><short>am</short><long>Amharic</long></code>

<code><short>ar</short><long>Arabic (العربية)</long></code>

<code><short>as</short><long>Assamese</long></code>

<code><short>ay</short><long>Aymara</long></code>

<code><short>az</short><long>Azerbaijani</long></code>

<code><short>ba</short><long>Bashkir</long></code>

<code><short>be</short><long>Byelorussian</long></code>

<code><short>bg</short><long>Bulgarian (Български)</long></code>

<code><short>bh</short><long>Bihari</long></code>

<code><short>bi</short><long>Bislama</long></code>

<code><short>bn</short><long>Bengali; Bangla</long></code>

<code><short>bo</short><long>Tibetan</long></code>

<code><short>br</short><long>Breton (Brezhoneg)</long></code>

<code><short>ca</short><long>Catalan/Valencian/Balearic (Català/Valencià/Balear)</long></code>

<code><short>co</short><long>Corsican</long></code>

<code><short>cs</short><long>Czech (Čeština)</long></code>

<code><short>cy</short><long>Welsh (Cymraeg)</long></code>

<code><short>da</short><long>Danish (Dansk)</long></code>

<code><short>de</short><long>German (Deutsch)</long></code>

<code><short>dz</short><long>Bhutani</long></code>

<code><short>el</short><long>Greek (Ελληνικά)</long></code>

<code><short>en</short><long>English</long></code>

<code><short>eo</short><long>Esperanto (Esperanto)</long></code>

<code><short>es</short><long>Espanol</long></code>

<code><short>et</short><long>Estonian (Eesti keel)</long></code>

<code><short>eu</short><long>Basque (Euskara)</long></code>

<code><short>fa</short><long>Farsi/Persian (فارسی)</long></code>

<code><short>fi</short><long>Finnish (Suomi)</long></code>

<code><short>fj</short><long>Fiji</long></code>

<code><short>fo</short><long>Faroese (Føroyskt)</long></code>

<code><short>fr</short><long>French (Français)</long></code>

<code><short>fy</short><long>Frisian</long></code>

<code><short>ga</short><long>Irish Gaelic (Gaeilge)</long></code>

<code><short>gd</short><long>Scots Gaelic (Gàidhlig)</long></code>

<code><short>gl</short><long>Galician</long></code>

<code><short>gn</short><long>Guarani</long></code>

<code><short>gu</short><long>Gujarati</long></code>

<code><short>ha</short><long>Hausa</long></code>

<code><short>he</short><long>Hebrew (עברית)</long></code>

<code><short>hi</short><long>Hindi (हिन्दी)</long></code>

<code><short>hr</short><long>Hrvatski</long></code>

<code><short>hu</short><long>Hungarian (Magyar)</long></code>

<code><short>hy</short><long>Armenian</long></code>

<code><short>ia</short><long>Interlingua</long></code>

<code><short>id</short><long>Indonesian (Bahasa Indonesia) (Bahasa Indonesia)</long></code>

<code><short>ie</short><long>Interlingue</long></code>

<code><short>ik</short><long>Inupiak</long></code>

<code><short>in</short><long>Indonesian (Bahasa Indonesia) (Bahasa Indonesia)</long></code>

<code><short>is</short><long>Islenska</long></code>

<code><short>it</short><long>Italian (Italiano)</long></code>

<code><short>iu</short><long>Inuktitut</long></code>

<code><short>iw</short><long>Hebrew (עברית)</long></code>

<code><short>ja</short><long>Japanese (日本語)</long></code>

<code><short>ji</short><long>Yiddish</long></code>

<code><short>jw</short><long>Javanese</long></code>

<code><short>ka</short><long>Georgian (ქართული)</long></code>

<code><short>kk</short><long>Kazakh</long></code>

<code><short>kl</short><long>Greenlandic</long></code>

<code><short>km</short><long>Cambodian</long></code>

<code><short>kn</short><long>Kannada</long></code>

<code><short>ko</short><long>Korean (한국어)</long></code>

<code><short>ks</short><long>Kashmiri</long></code>

<code><short>ku</short><long>Kurdish (Kurdî)</long></code>

<code><short>ky</short><long>Kirghiz</long></code>

<code><short>la</short><long>Latin (Latina)</long></code>

<code><short>ln</short><long>Lingala</long></code>

<code><short>lo</short><long>Laothian</long></code>

<code><short>lt</short><long>Lithuanian (Lietuvių kalba)</long></code>

<code><short>lv</short><long>Latvian (Latviešu valoda)</long></code>

<code><short>mg</short><long>Malagasy</long></code>

<code><short>mi</short><long>Maori</long></code>

<code><short>mk</short><long>Macedonian</long></code>

<code><short>ml</short><long>Malayalam</long></code>

<code><short>mn</short><long>Mongolian</long></code>

<code><short>mo</short><long>Moldavian</long></code>

<code><short>mr</short><long>Marathi</long></code>

<code><short>ms</short><long>Malay (Bahasa Melayu)</long></code>

<code><short>mt</short><long>Maltese</long></code>

<code><short>my</short><long>Burmese</long></code>

<code><short>na</short><long>Nauru</long></code>

<code><short>ne</short><long>Nepali</long></code>

<code><short>nl</short><long>Nederlands</long></code>

<code><short>no</short><long>Norwegian (Norsk)</long></code>

<code><short>oc</short><long>Occitan</long></code>

<code><short>om</short><long>(Afan) Oromo</long></code>

<code><short>or</short><long>Oriya</long></code>

<code><short>pa</short><long>Punjabi</long></code>

<code><short>pl</short><long>Polish (Polski)</long></code>

<code><short>ps</short><long>Pashto, Pushto</long></code>

<code><short>pt</short><long>Portuguese (Português)</long></code>

<code><short>qu</short><long>Quichua (Runa shimi)</long></code>

<code><short>rm</short><long>Rhaeto-Romance</long></code>

<code><short>rn</short><long>Kirundi</long></code>

<code><short>ro</short><long>Romanian (Româneşte)</long></code>

<code><short>ru</short><long>Russian (Русский)</long></code>

<code><short>rw</short><long>Kinyarwanda</long></code>

<code><short>sa</short><long>Sanskrit</long></code>

<code><short>sd</short><long>Sindhi</long></code>

<code><short>sg</short><long>Sangho</long></code>

<code><short>sh</short><long>Serbian & Croatian (Српски i Hrvatski)</long></code>

<code><short>si</short><long>Sinhalese</long></code>

<code><short>sk</short><long>Slovak (Slovenský)</long></code>

<code><short>sl</short><long>Slovenian (Slovenski)</long></code>

<code><short>sm</short><long>Samoan</long></code>

<code><short>sn</short><long>Shona</long></code>

<code><short>so</short><long>Somali</long></code>

<code><short>sq</short><long>Albanian (Shqip)</long></code>

<code><short>sr</short><long>Serbian & Croatian (Српски i Hrvatski)</long></code>

<code><short>ss</short><long>Siswati</long></code>

<code><short>st</short><long>Sesotho</long></code>

<code><short>su</short><long>Sundanese</long></code>

<code><short>sv</short><long>Swedish (Svenska)</long></code>

<code><short>sw</short><long>Swahili</long></code>

<code><short>ta</short><long>Tamil</long></code>

<code><short>te</short><long>Telugu</long></code>

<code><short>tg</short><long>Tajik</long></code>

<code><short>th</short><long>Thai (ไทย)</long></code>

<code><short>ti</short><long>Tigrinya</long></code>

<code><short>tk</short><long>Turkmen</long></code>

<code><short>tl</short><long>Tagalog (Tagalog)</long></code>

<code><short>tn</short><long>Setswana</long></code>

<code><short>to</short><long>Tongan (Lea faka-Tonga)</long></code>

<code><short>tr</short><long>Turkish (Türkçe)</long></code>

<code><short>ts</short><long>Tsonga</long></code>

<code><short>tt</short><long>Tatar</long></code>

<code><short>tw</short><long>Twi</long></code>

<code><short>ug</short><long>Uighur</long></code>

<code><short>uk</short><long>Ukrainian (Українська)</long></code>

<code><short>ur</short><long>Urdu</long></code>

<code><short>uz</short><long>Uzbek</long></code>

<code><short>vi</short><long>Vietnamese (Tiếng Việt)</long></code>

<code><short>vo</short><long>Volapuk</long></code>

<code><short>wo</short><long>Wolof</long></code>

<code><short>xh</short><long>Xhosa</long></code>

<code><short>yi</short><long>Yiddish</long></code>

<code><short>yo</short><long>Yoruba</long></code>

<code><short>za</short><long>Zhuang</long></code>

<code><short>zh</short><long>Chinese (中文)</long></code>

<code><short>zu</short><long>Zulu</long></code>

</languagecodes>


5 comments:

Anonymous said...

你好
我常常會到此看一下關於xbmc的新資訊
但是最近360也沒有新版本出現
不知道您是否有考慮再提供呢?

kaku03 said...

360?是TvGame360討論區嗎?最近XBMC又陷入重整期,感覺上還不如舊版的好用。如果你急於嚐鮮,國外T3CH倒是每週都會釋出新版本(但要自行中文化)。我個人並不建議更換近期的版本,如果你手邊有習慣的版本,就繼續使用吧!

Anonymous said...

原來是這樣ㄚ
那我就繼續使用舊的
感謝您的回覆

Anonymous said...

看你加ㄌ一多修改好ㄉ功能 可否用4~12都版本去修改 把你修改好有你喜愛ㄉ功能 加入 傳上TV360 分享給大家 因為不是每個人都懂電腦何況修改 謝謝你阿~

kaku03 said...

每個人喜愛的功能不盡相同。我偏重於說明更改的方式,是希望有興趣的朋友DIY。以前我有固定分享我使用的Home.xml,現在是想說等XBMC稍微穩定一點時再上傳,只是這一天還一直等不到……