AnsweredAssumed Answered

OpenWorkdesk in YOUR custom language

Question asked by deko Employee on Jul 2, 2010
Latest reply on May 11, 2011 by unknown-user
At the moment, OpenWorkdesk (OWD) Community Edition comes in three languages:

- English
- German
- Romanian

[img]http://openworkdesk.org/img/languages.JPG[/img]

The language can be changed by clicking the desired language in the upper right corner of the OWD login screen. For translating OWD, OWD development team introduced keys for every OWD String output, which are listed together with their respective "language" value in a properties file (e.g. oecmlocalize_en.properties for the english language). Those properties files can be found in the oecmlocalize_3000.jar file in the WEB-INFlib folder of your OWD Community Edition deployment.

The selectable languages on the login screen are configurable by editing following lines in the WEB-INFconfcmisowbootstrap.xml file of your deployment:


<availablelocals display='true'>
   <!– for German also de_au.gif (Austria) or de_ch.gif (Swiss) flag available –>
   <lang icon="/images/lang/de.gif" displayname="Deutsch">de</lang>
   <!– for English also en_gb.gif (British) flag available  –>
   <lang icon="/images/lang/en.gif" displayname="English">en</lang>
   <!– <lang icon="/images/lang/debugmode.gif" displayname="Debug Mode (for developers only)">debugmode</lang> –>
</availablelocals>

There are two ways to translate OWD Community Edition to YOUR language

Method 1:
Open an existing properties file from the oecmlocalize_3000.jar file, translate every key value to your language, rename the properties file (e.g. to oecmlocalize_ex.properties) and save it to the jar file. Add the new language to the code shown above in owbootstrap.xml like in following example:


<availablelocals display='true'>
   <!– for German also de_au.gif (Austria) or de_ch.gif (Swiss) flag available –>
   <lang icon="/images/lang/de.gif" displayname="Deutsch">de</lang>
   <!– for English also en_gb.gif (British) flag available  –>
   <lang icon="/images/lang/en.gif" displayname="English">en</lang>
   <!– for YOUR language –>
   <lang icon="/images/lang/ex.gif" displayname="Example">ex</lang>
   <!– <lang icon="/images/lang/debugmode.gif" displayname="Debug Mode (for developers only)">debugmode</lang> –>
</availablelocals>

You can even add a flag symbol for your language to the designdefault20imageslang folder of your deployment. In the code example the image was specified to be named ex.gif. After a server restart, you should now be able to choose your language from the OWD login screen.

Method 2:

Create a new properties file (e.g. oecmlocalize_ex.properties) and enter OWD´s keys with your respective language value. The keys for the output strings are shwon in so called debug mode. To enable debug mode, uncomment the debug mode part like in the following lines of owbootstrap.xml:


<availablelocals display='true'>
   <!– for German also de_au.gif (Austria) or de_ch.gif (Swiss) flag available –>
   <lang icon="/images/lang/de.gif" displayname="Deutsch">de</lang>
   <!– for English also en_gb.gif (British) flag available  –>
   <lang icon="/images/lang/en.gif" displayname="English">en</lang>
   <lang icon="/images/lang/debugmode.gif" displayname="Debug Mode (for developers only)">debugmode</lang>
</availablelocals>

Change language to Debug Mode from OWD´s login screen and you will see the original keys instead of OWD´s output strings. Add a key to the properties file with his respective "language" value like the following example:

key=value

Seperate the different key-value pairs by entering each pair in a new line. Save the new properties file into the oecmlocalize_3000.jar file. If your properties file would be named oecmlocalize_ex.properties, you´d have to add the language to owbootstrap.xml like in the following example:


<availablelocals display='true'>
   <!– for German also de_au.gif (Austria) or de_ch.gif (Swiss) flag available –>
   <lang icon="/images/lang/de.gif" displayname="Deutsch">de</lang>
   <!– for English also en_gb.gif (British) flag available  –>
   <lang icon="/images/lang/en.gif" displayname="English">en</lang>
   <!– for YOUR language –>
   <lang icon="/images/lang/ex.gif" displayname="Example">ex</lang>
   <!– <lang icon="/images/lang/debugmode.gif" displayname="Example (for developers only)">debugmode</lang> –>
</availablelocals>

You can even add a flag symbol for your language to the designdefault20imageslang folder of your deployment. In the code example the image was specified to be named ex.gif. After a server restart, you should now be able to choose your language from the OWD login screen.

Outcomes