Translate Messages

Jetspeed2 has the translatable messages in Java properties and XML files

Properties File

This document shows how to create a message properties file for your language.

1. Find *_en.properties

*_en.properties is English message properties file. You can use it as a base properties file for your language.

If you use UNIX system, you can use find command to find the properties files:

$ cd ${jetspeed-2-home}
$ find . -type f | grep -v CVS | grep _en.properties
2. Copy *_en.properties to *_<your language, [country and variant]>.properties.orig

To translate messages, copy the properties file for your language. For more information about Language, Country and Variant code, see "JavaDoc: Locale Class", "ISO Language Code" and "ISO Country Code".

Example:

$ cd applications/localeselector/src/java/org/apache/jetspeed/portlets/localeselector/resources/
$ cp LocaleSelectorResources_en.properties LocaleSelectorResources_ja.properties.orig

where *_ja.properties is Japanese message file.

3. Translate *_<your language, [country and variant]>.properties.orig in your language

For more information about a properties file, see "JavaDoc: Properties Class".

4. Run native2ascii command

Since the properties file is assumed to be using the ISO 8859-1 character encoding, use native2ascii command to convert to ISO 8859-1. For more information about "native2ascii(Solaris)" or "native2ascii(Windows)".

Example:

$ native2ascii LocaleSelectorResources_ja.properties.orig LocaleSelectorResources_ja.properties
5. Build & Deploy Jetspeed2, and see if your translation is displayed

For more information about Jetspeed 2 build and deploy steps, see "Getting Started".

6. Create a new JIRA issue, and attach *_<your language, [country and variant]>.properties

JIRA site for Jetspeed 2 is http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10492. To create a new JIRA issue, go to "CREATE NEW ISSUE"(select "l10n" as Component/s name).