properties-files, i18n and translating

Sometimes you would like to change just a little bit in the text that is displayed on the OpenClinica screen. Or you would like to modify the content of, for example, the mail that is sent after a dataset has been created.

fig. 1: mail-message

In this message we would of course love to replace the last words with: Thank you, the TrialDataSolutions Team. You probably know that all this information is stored in the so-called properties files. Those are located in your tomcat-webapps-dir, under the OpenClinica folder\WEB-INF\classes\org\akaza\openclinica\i18n.

There are nine, or rather eight not counting the, of these files and when you open them you can edit them in any text-editor. The only problem is that they contain more than 3000 terms!

can we make that easier?

Very few like to go through such a list and find what they're looking for manually and that's why you can download an MS Access database where all the terms of OpenClinica 3.2 are stored in one big table, called tblPropertiesValues.
(Click here for OpenClinica pre 3.1.4. and here for OpenClinica 3.1.4.x)

fig. 1: tblPropertiesValues

To find the term Development Team you just click in the column labeled none, press Ctrl-F etc. Now you know in which file to look for the term, so you could go to the file, edit and save it and restart OpenClinica to enjoy the result.
But you can also use the form that is included and that was meant for something different altogether: translating OpenClinica

translating OpenClinca

The main reasons why I started this database was that I wanted to translate the interface in Dutch. But I got stuck somewhere in the middle. But my plan was to 'just' go through the terms and translate them, using the form labeled frmPV.

fig. 3: form for translating terms

The use of the form is basically: choose a language; type your translations in the box at the bottom and when finished click the button write prop files for selected language. If you made any changes to the standard terms, that are in field none, you can click the button write main properties files. The only thing you must do is make sure the location of the files is correct. It is displayed at the top of the form and it is set as a Constant in modReadAndWrite.

fig. 4: setting the location of the files

unicode, anyone?

If you are translating into a language with nice, but non ASCII characters, like Portugese, you must convert all these characters into their unicode-format. And this is not difficult, because of the button labeled generate unicode. For example you want to translate Please see the instructions to the right on the main page. Faithfully you enter this in Google Translate and you paste the result in Access

fig. 5: pasting the result of Google-translate

Next you click on generate unicode and all characters are transformed to unicode and below the box you can see the result.

fig. 6: unicode transformation

and it looks like ...

Have fun with this database: treat yourself to a wealth of Chinese characters by choosing zh writing the files and restarting OpenClinica. Then click in Firefox Tools, Options

fig. 7: setting languages in Firefox

Add zh and move it to the first position

fig. 8: setting languages in Firefox

fig. 9: your home, but differently

If you would like to contribute translations or work on the existing ones: contact OpenClinica! If you have questions about the database, contact me.

Other how-to-pages can be found here.

this page was last reviewed April 2014