In short terms: We are using standard java localization mechanisms, see java.sun.com/developer/technicalArticles/Intl/ResourceBundles/
1) Identify bundle propertie files
Every server module has a subpackes res (e.g. de.linogistix.los.location.res). Similarily, every client module has a subpackes res (e.g. de.linogistix.location.res). Where to find this package depends on the distribution you work with:
In the source distribution
Under server.app directory you’ll find the server modules (i.e. los.common-ejb, los.location-ejb, los.inventory-ejb, …) each having a source subdirectory src. Look for the res package there (e.g. server.app/los.location-ejb/src/de/linogistix/los/location/res).
Under rich.client\los.clientsuite you’ll find the client modules (LOS Common, LOS Location Browser, LOS Inventory Browser, …) each having a source subdirectory src. Look for the res package there (e.g. rich.client/los.clientsuite/src/de/linogistix/location/res).
In the individual res package you’ll find the Bundle properties files (e.g. ‘Bundle.properties’ for default language (english) and ‘Bundle_de_DE.properties’ for german language).
In the ear package or jar archives
For server modules, have a look at the deploy directory jboss/server/default/deploy/los.reference.ear. There you’ll find the modules, e.g.:
Each *.jar contains its res package. Look for it2] and you’ll find the Bundle properties files inside (e.g. ‘Bundle.properties’ for default language (english) and ‘Bundle_de_DE.properties’ for german language).
for client modules, hava a look at los_reference/linogistix_clientsuite/modules:
As for server modules, each *.jar contains its res package. Look for it and you’ll find the Bundle properties files inside (e.g. ‘Bundle.properties’ for default language (english) and ‘Bundle_de_DE.properties’ for german language).
2) Create new bundle properties file
Copy Bundle.properties to a new localized bundle properties file. E.g. to add support for russian this file will be called Bundle_ru_RU.properties . Then open the file in an editor (UTF-8!) and replace in each line the english expression (or value part of the property, i.e. everything on the right side of ‘=’) with its russian translation.
Please watch out if you have special characters in you language or use a complete different character set, e. g. russian do. The file has to be encoded not in native but in ASCII style. If you experience issues with not correctly displayed characters in the software / NetBeans IDE please consider the support.
has to be changed in
NOT_LOCKED_0=<<the russian translation of ‘Not locked’>>
3) Deploy the newly created properties file
Copy the newly created file in the src folder (or in the jar archive depending on your distribution) where the original bundle properties files reside- And you are done.
4) Take the changes in effect
Start the LOS rich client. In the User section add a new user and set his locale property to ‘ru_RU’ (or “en_EN” for English). This can also be done in the database: adapt mywms_user.locale to your needs.
After a restart of the LOS rhich client and new login with this user the GUI comes in the desired language.
[#1] a complete list of modules is given in the description of how to setup Sources
[#2] Some zip programs like 7-Zip not only allow for browsing a jar file but for conviniently editing/adding files “on the fly” inside the archive without the need of unzipping/adding/zipping manually.
[#3] A very convinient Editor comes with NetBeans IDE. There you see just one virtual file ‘Bundle.properties’ in project view that masks the individual files ‘Bundle.properties’, ‘Bundle_de_DE.properties’, ‘Bundle_ru_RU.properties’. Choosing “Edit” in the contextmenu opens a spreadsheet-like view containing the key of the property on the first left column followed by one column per language.