According to the schedule for the past two weeks I have been working on adding internationalization (i18n) support for the OpenOffice plug-in. I have completed this task successfully and now the plug-in uses some existing translations from the transifex. Lets have a look at the internationalization process.
The plug-in is developed using Java. Java supports internationalization using resource bundles. Resource bundle is the file that contains locale-specific data instead of the code itself, therefore making the code locale independent. There are two types of resource bundles .properties files and .class files. The .properties format is a text file that can be edited directly like a PO file, but this does not support plural forms. On the other hand .class format is compiled from .java source code and can support plural forms through the gnu.gettext.GettextResource API.
Here I have used .class format for resource bundle because the plural forms can be used, but I am not using gnu.gettext.GettextResource API because there is no need of plural forms at this point (Extracting new strings for internationalization is not completed yet).
I have added two shell scripts to convert PO files to resource bundle and extract new strings. You can run them separately or use them when compiling the project. To use them when compiling uncomment line 75-82 of the build.xml, but conversion will take about 3 minutes to complete, therefore it is better to use the scripts separately only when you need add a new translation or extract new strings.
Here is a screen shot of the GUI with some Spanish translated strings (I choose Spanish because of this comment).
[caption id="" align="aligncenter" width="370" caption="GUI in Spanish"][/caption]