Questions and Answers

RE: Multi-Language support

Toggle
Multi-Language support
multi-language
Answer
5/18/11 3:58 PM
since there is a switch between english and dutch, can some other languages be added on top of this product?

thanks
0 (0 Votes)

RE: Multi-Language support
Answer
5/18/11 4:26 PM as a reply to Ming Li.
Dear Ming Li,

we currently only support German and English as these are the languages we have native speakers for.

If there is community interest in providing regular support for other languages as well we can provide the necessary information and infrastructure for user defined translations. This would consist of providing two translated java properties files.

What language would be of interest to you?

Regards,

Torsten
0 (0 Votes)

RE: Multi-Language support
Answer
5/18/11 4:31 PM as a reply to Torsten Stolpmann.
It would be chinese. it you can guide me through how to make a java property file, i would be happy to help translate it into chinese
0 (0 Votes)

RE: Multi-Language support
Answer
5/18/11 5:21 PM as a reply to Ming Li.
Great to hear that you would volunteer for this!

The two property files in question would be plain text files which use an ISO-8859-1 encoding (this is mandatory). For you this would mean you must use an editor which saves chinese characters in unicode escape sequences like this:

1234
default.paginate.prev =\u4e0a\u4e00\u9875
default.paginate.next =\u4e0b\u4e00\u6b65
default.boolean.true =\u771f
default.boolean.false =\u5047


Else you may use your editor of choice like shown below and use the java native2ascii utility to do the unicode conversion before uploading the translated file.

1234
default.paginate.prev =上一页
default.paginate.next =下一步
default.boolean.true =真
default.boolean.false =假


If you are using Eclipse for editing this might be helpful: http://propedit.sourceforge.jp/index_en.html which does the unicode conversion automatically.

To get you started you basically need to copy

<Klaros Installation Directory>/webapps/klaros-web/WEB-INF/classes/de/verit/klaros/report/jasper_en.properties to
<Klaros Installation Directory>/webapps/klaros-web/WEB-INF/classes/de/verit/klaros/report/jasper_zh_CN.properties (about 2KB ) and

<Klaros Installation Directory>/webapps/klaros-web/WEB-INF/classes/de/verit/klaros/web/messages_en.properties to
<Klaros Installation Directory>/webapps/klaros-web/WEB-INF/classes/de/verit/klaros/web/messages_zh_CN.properties (about 64KB )

and of course translate everything right of the first '=' character.

If you server machine is configured to use a chinese locale setting (LANG environment variable under linux, system settings under windows) these new translation files should be used as the default language automatically on the next restart.

Please note that the Klaros server has to be restarted to pick up any changes you make to the new property files!


I opened the feature request KLAROS-1312 (Add support for developing and uploading user defined language files) to provide a less combersome way to develop and install new translations in future versions.

Please leave a message here if you encounter any problems.

Looking forward on your progress,

Torsten
0 (0 Votes)

RE: Multi-Language support
Answer
5/19/11 4:01 AM as a reply to Torsten Stolpmann.
HI,


i found the file location for the new installation is as follow, and there are no properties files under report folder, is that correct?

<installation dir>Klaros-Testmanagement\webapps\klaros-web\WEB-INF\classes

files are:

bridge-messages.properties
bridge-messages_de.properties
bridge-messages_en.properties
0 (0 Votes)

RE: Multi-Language support
Answer
5/19/11 4:13 AM as a reply to Ming Li.
Hi,

I have found other locations that contains the *_en.properties files, from what i see, i need to make modification to them:

<installation dir>\Klaros-Testmanagement\webapps\klaros-web\WEB-INF\classes\de\verit\klaros\web\messages_en.properties

<installation dir>Klaros-Testmanagement\webapps\klaros-web\WEB-INF\classes\de\verit\klaros\report\jasper_en.properties

<installation dir>Klaros-Testmanagement\webapps\examples\WEB-INF\classes\localstring_en.properties


as well as previously noted:
<installation dir>Klaros-Testmanagement\webapps\klaros-web\WEB-INF\classes\bridge-messages_en.properties


am I on the correct path?

thanks
0 (0 Votes)

RE: Multi-Language support
Answer
5/19/11 6:01 AM as a reply to Ming Li.
how do i active the message_zh_CN.properties file?

for my test, i renamed the zh_CN file into en, so my site is now in chinese, please see attach
0 (0 Votes)

RE: Multi-Language support
Answer
5/19/11 10:42 AM as a reply to Ming Li.
<installation dir>Klaros-Testmanagement\webapps\examples\WEB-INF\classes\localstring_en.properties

You do not need to change this as this part of the default tomcat installation examples.

as well as previously noted:
<installation dir>Klaros-Testmanagement\webapps\klaros-web\WEB-INF\classes\bridge-messages_en.properties


Yes, I forgot about that one. Sorry.

am I on the correct path?


Absolutly. emoticon

Cheers,

Torsten
0 (0 Votes)

RE: Multi-Language support
Answer
5/19/11 11:17 AM as a reply to Ming Li.
I am impressed with your progress!

Regarding your question:

The _en message bundles are the fallback solution when no support for the system language settings have been found.

I was blind guessing that your system locale settings are zh_CN but they obviously are not, as is shown on your screen dump (it shows en for the system language).

To force the zh_CN language you should add the following line to <installation_dir>/bin/setenv.bat:

1
set JAVA_OPTS=-Duser.language=zh -Duser.country=CN %JAVA_OPTS%


Or if you are using linux add the following to <installation_dir>/bin/setenv.sh:

1
JAVA_OPTS=-Duser.language=zh -Duser.country=CN ${JAVA_OPTS}


If you succeed the system settings page in Klaros should show zh for your language (country is not listed there).

Hope this helps,

Torsten
0 (0 Votes)

RE: Multi-Language support
Answer
5/19/11 1:03 PM as a reply to Torsten Stolpmann.
Torsten Stolpmann:
I am impressed with your progress!

Regarding your question:

The _en message bundles are the fallback solution when no support for the system language settings have been found.

I was blind guessing that your system locale settings are zh_CN but they obviously are not, as is shown on your screen dump (it shows en for the system language).

To force the zh_CN language you should add the following line to <installation_dir>/bin/setenv.bat:

1
set JAVA_OPTS=-Duser.language=zh -Duser.country=CN %JAVA_OPTS%


Or if you are using linux add the following to <installation_dir>/bin/setenv.sh:

1
JAVA_OPTS=-Duser.language=zh -Duser.country=CN ${JAVA_OPTS}


If you succeed the system settings page in Klaros should show zh for your language (country is not listed there).

Hope this helps,

Torsten


I can force it to only show chinese, but will it allow me to switch back and forth between Chinese and English?

here is my lazy way to accomplished this:

put the chinese properties into the _en file, and the english properties into the _de file. find a chinese flag png file and rename it accordingly(chinese flag name en_EN.png, and USA flag named de_DE.png) ...viola, i got chinese and english that i can switch back and forth.

i'm attaching the actual chinese property files(ignore the _en part) for your development team to use as a reference(I'm sure there might be some bad translations, but it'll do for now.) rename the files back to .properties as the site wont allow the upload of .properties files
0 (0 Votes)

RE: Multi-Language support
Answer
5/19/11 1:12 PM as a reply to Ming Li.
I can force it to only show chinese, but will it allow me to switch back and forth between Chinese and English?

here is my lazy way to accomplished this:

put the chinese properties into the _en file, and the english properties into the _de file. find a chinese flag png file and rename it accordingly(chinese flag name en_EN.png, and USA flag named de_DE.png) ...viola, i got chinese and english that i can switch back and forth.


Perfect - this is what I also would have suggested. With the next release we will provide a way which should allow you to install translations in a proper manner.

Thanks a lot for your efforts, this is much appreciated!

Regards,

Torsten
0 (0 Votes)

RE: Multi-Language support
Answer
6/27/11 1:53 PM as a reply to Torsten Stolpmann.
Hi Ming,

Klaros 3.4.3 now contains proper support for custom language files. Please refer to the documentation for details,
I would be glad for receiving your feedback.

Regards,

Torsten
0 (0 Votes)

RE: Multi-Language support
Answer
9/14/11 11:37 AM as a reply to Torsten Stolpmann.
Hi,

I will try it out and get back to you with some feedback.

thanks
0 (0 Votes)

RE: Multi-Language support
Answer
9/14/11 12:35 PM as a reply to Ming Li.
Hi


I have added the properties file into the directory of

D:\Program Files\Klaros-Testmanagement\webapps\klaros-web\WEB-INF\classes\de\verit\klaros\web

then i also have restarted the services, it cant seem to load the file into the control panel as a custom language as described in the manual.

please advise

thanks
0 (0 Votes)

RE: Multi-Language support
Answer
9/14/11 12:53 PM as a reply to Ming Li.
Hi,

the properties file should be placed in the
1
<userhome>/.klaros/resources/messages
folder in the home folder for the user running Klaros, e.g. by default in Windows XP this would be
1
C:\Documents and Settings\<username>\.klaros\resources\messages


This folder is searched during startup and when "Refresh message files" is pressed.

I hope this helps!

Regards,
Patrick
0 (0 Votes)

RE: Multi-Language support
Answer
9/14/11 12:58 PM as a reply to Patrick Reilly.
that explains it...works now.

thank you!

Patrick Reilly:
Hi,

the properties file should be placed in the
1
<userhome>/.klaros/resources/messages
folder in the home folder for the user running Klaros, e.g. by default in Windows XP this would be
1
C:\Documents and Settings\<username>\.klaros\resources\messages


This folder is searched during startup and when "Refresh message files" is pressed.

I hope this helps!

Regards,
Patrick
0 (0 Votes)

RE: Multi-Language support
Answer
9/14/11 1:35 PM as a reply to Torsten Stolpmann.
Hi,

couple of recommendations:

1. it would be nice to just have an ADD language button, so there is no need to worry about where to put the lang file
2. it would be nice to have a default button to set particular lang file as startup language


thanks


Torsten Stolpmann:
Hi Ming,

Klaros 3.4.3 now contains proper support for custom language files. Please refer to the documentation for details,
I would be glad for receiving your feedback.

Regards,

Torsten
0 (0 Votes)