...
e.g. http://server:8080/weave/main.html?locale=sv
or http://server:8080/weave/index.html?locale=en_AU
Resource property files
Version 2.15.8 of the com.cohga.client.weave bundles adds support for resources defined in external properties files, rather than just in <resources> tags in config files.
All .properties files in a 'i18n' directory under the 'workspace' directory will be processed for loading of resources. The format of the files should follow the standard Java properties file format, e.g. each line should be of the format 'name=value'
If file name include an underscore, '_', in the base name then the characters after the underscore will be the locale for the resources, the part of the name before the underscore is ignored. e.g. test_sv.properties will contain Swedish resources. No underscore means no locale for the resources so they'll be used as default values.
Info |
---|
The file should be stored with UTF-8 encoding, although if the file contains a BOM (byte order mark) it can use other UTF encodings. |
Note |
---|
This encoding is different from "standard" Java properties files which assume an ISO-8859-1 encoding, but that would mean that a lot of non-ascii characters would have to be encoded using "\uXXXX" format in the file which would be too much of a pain to manage for people doing the translations. |
Finally, it's possible to zip up the contents of the i18n directory and have that used instead of the i18n directory itself.