TaT NetbeansPlatformLocalizationAsPlugins

Netbeans Platform Localization as Plugins

This is another series of Netbeans Platform i18n and localization trick. This methods is used to localize Netbeans Platform based Application which can be updated using Update Center. It also have an entry on the Plugins List. However, please note this may be somekind of HACK. The proper localization should be following Netbeans Localization Project.

As far as I understand, the netbeans store the locale into the folder the-cluster/modules/locale. So somehow you need to put your jar (contain only locale) into that folder. Another important point that the jar name must be the same name as the module you want to localize eg:

- for com-your-modules.jar, the locale jar name should be com-your-modules[_country_lang].jar
- for org-netbeans-core.jar, the locale jar name should be org-netbeans-core[_country_lang].jar
- etc

The country code and lang is optional for the jar name. It only use if you really want to separate the jar for each locale. To keep thing simple we do not append the country code/language and all the supported locale will be under single jar.

Step 1: Create new module

The first step is to create new module project that will contain the localization (in this case for all languages). Inside the new module, create package (folder structure) which matching the things you want to localize and create the appropriate properties file localized (append country code and language)
eg: kiyut.alkitab.actions.Bundle_in_ID.properties

For the platform/ide cluster you need to find out where the text is localized and the jar name eg:
org.netbeans.core.actions.Bundle
with key Exit=E&xit
jar name = org-netbeans-core.jar
And create the same structure in the above new module project.

Step 2: Modify the build.xml

The next step is to modify the build.xml to produce the jar in appropriate location (note: the locale folder). The output will something like this