Localizing Derby Messages
The English message sources live in the following locations:
English Message File |
Description |
java/engine/org/apache/derby/loc/messages.xml |
Diagnostic messages from the core Derby engine. |
java/drda/org/apache/derby/loc/drda/messages_en.properties |
Diagnostic messages from the Network Server. |
java/drda/org/apache/derby/loc/drda/servlet_en.properties |
Diagnostic messages from the Network Server servlet. |
java/engine/org/apache/derby/loc/toolsmessages.properties |
Diagnostic messages for most Derby tools. |
java/engine/org/apache/derby/loc/sysinfoMessages.properties |
Diagnostic messages for the sysinfo tool. |
Localizations for other languages live in the same directories as the English versions. Supported languages include:
Language |
Engine Message Source |
Network Server Message Source |
Network Server Servlet Message Source |
Tools Message Source |
Sysinfo Message Source |
Czech |
messages_cs.properties |
messages_cs.properties |
servlet_cs.properties |
toolsmessages_cs.properties |
sysinfoMessages_cs.properties |
German |
messages_de_DE.properties |
messages_de_DE.properties |
servlet_de_DE.properties |
toolsmessages_de_DE.properties |
sysinfoMessages_de_DE.properties |
Spanish |
messages_es.properties |
messages_es.properties |
servlet_es.properties |
toolsmessages_es.properties |
sysinfoMessages_es.properties |
French |
messages_fr.properties |
messages_fr.properties |
servlet_fr.properties |
toolsmessages_fr.properties |
sysinfoMessages_fr.properties |
Hungarian |
messages_hu.properties |
messages_hu.properties |
servlet_hu.properties |
toolsmessages_hu.properties |
sysinfoMessages_hu.properties |
Italian |
messages_it.properties |
messages_it.properties |
servlet_it.properties |
toolsmessages_it.properties |
sysinfoMessages_it.properties |
Japanese |
messages_ja_JP.properties |
messages_ja_JP.properties |
servlet_ja_JP.properties |
toolsmessages_ja_JP.properties |
sysinfoMessages_ja_JP.properties |
Korean |
messages_ko_KR.properties |
messages_ko_KR.properties |
servlet_ko_KR.properties |
toolsmessages_ko_KR.properties |
sysinfoMessages_ko_KR.properties |
Polish |
messages_pl.properties |
messages_pl.properties |
servlet_pl.properties |
toolsmessages_pl.properties |
sysinfomessages_pl.properties (note the difference in case) |
Portuguese |
messages_pt_BR.properties |
messages_pt_BR.properties |
servlet_pt_BR.properties |
toolsmessages_pt_BR.properties |
sysinfoMessages_pt_BR.properties |
Russian |
messages_ru.properties |
messages_ru.properties |
servlet_ru.properties |
toolsmessages_ru.properties |
sysinfoMessages_ru.properties |
Chinese (Simplified) |
messages_zh_CN.properties |
messages_zh_CN.properties |
servlet_zh_CN.properties |
toolsmessages_zh_CN.properties |
sysinfoMessages_zh_CN.properties |
Chinese (Traditional) |
messages_zh_TW.properties |
messages_zh_TW.properties |
servlet_zh_TW.properties |
toolsmessages_zh_TW.properties |
sysinfoMessages_zh_TW.properties |
Typically, as the community develops a new feature release, more messages accumulate in the English message sources. Those English versions need to be localized. Those localizations, in turn, typically turn up in follow-on maintenance releases. Localizations are more up-to-date for some languages than for others.
Typically, localizations for several languages are provided by committers who work for large companies and who have access to their companies' translation teams. Although this translating work happens outside the Derby community, committers checkin this contribution by proxy, under section 4 of their ICLAs.
This process reflects the consensus of two discussions which took place on the legal-discuss mailing list:
- Blanket software grant
- Question about handling external updates to contributed files
and a discussion which took place on the derby-dev list.
The following post sums up the consensus:
"If you have permission from your company, you can contribute them under your own ICLA. However, it is better for your sake (not Apache's) that you have a signed CCLA in place that formally says you have permission to commit stuff that is copyright the company. Only one CCLA is needed for all such commits."
To test Chinese (Traditional, Taiwan) or (Simplified, PRC) for Derby on Windows 7
1. Setting up the system:
- Make sure you have Chinese (Traditional, Taiwan) language pack installed on your Windows 7 machine.
Go to Control Panel->Clock, Language, and Region->Install or uninstall display languages->Install display languages->Launch Windows Updates (This is some screen shop in turn of what you can download http://windows7center.com/news/windows-7-rtm-language-packs-now-available-via-windows-update/)
2. Change system locale to use Chinese (Traditional, Taiwan):
Go to Control Panel->Clock, Language, and Region->Install or uninstall display languages->Administrative->Change System Locale->Choose Chinese (Traditional, Taiwan)
3. Setup ij to displaye Chinese (Traditional, Taiwan)
- Please use the following option for org.apach.derby.tools.ij: -Dderby.ui.locale=zh_TW –Dderby.ui.codeset=big5
4. Setup derby server (database side) to display Chinese (Traditional, Taiwan)
- -Duser.language=zh –Duser.country=TW
For example:
$ java -Duser.language=zh -Duser.country=TW org.apache.derby.tools.ij -p derby.
properties
ij 版本 10.7
ij> connect 'jdbc:derby:aa';
錯誤 XJ004:找不到資料庫 'aa'。
ij> connect 'jdbc:derby:test_chinese;create=true;user=REFRESH;password=Refresh';
ij> select * from 家長;
錯誤 42Y07:綱目 'REFRESH' 不存在。
ij> create table 中文(stroke int, 字 varchar(4));
已插入/更新/刪除 0 列
ij> insert into 中文 values (1, '國');
- 已插入/更新/刪除 1 列
ij> insert into 中文 values (2, '生', '09-17-2010');
- 錯誤 42802:指派的值數目與指定的或隱含的直欄數不相同
To test Chinese (Simplified, PRC) for Derby on Windows 7
1. Have Chinese (Simplified, PRC) installed.
(A detail instruction on install Chinese (Simplified, PRC) can be found in:
2. Change system locale to Chinese (Simplified, PRC)
3. Setup ij to display Chinese (Simplified, PRC)
- Please use the following option:
- -Dderby.ui.locale=zh_CN –Dderby.ui.codeset=GB2312
4. Setup derby server (database side) to display Chinese (Simplified, PRC)
- Please use the following option:
- -Duser.language=zh –Duser.country=CN
For example:
$ java -Duser.language=zh -Duser.country=CN org.apache.derby.tools.ij -p derby.
properties
ij 版本 10.7
ij> connect 'jdbc:derby:test_cn;create=true;user=REFRESH;password=Refresh';
ij> values current_date;
1
2010-09-11
已选择 1 行
ij> select * from aa;
错误 42Y07:模式“REFRESH”不存在。
ij> create table 登录 (输入 int, 记录 varchar(4));
已插入/更新/删除 0 行
ij> insert into 登录 values (1, '北京');
已插入/更新/删除 1 行
ij> insert into 登录 values (1, '重庆', '广州');
错误 42802:已分配值的数目与指定列或暗指列的数目不同。
One can also use java program to look at the messages_zh_CN.properties. Please use –Dfile.encoding=Cp939 for Chinese (Simplified, PRC ) and –Dfile.encoding=Cp950 for Chinese(Traditional, Taiwan)