How to build a resource bundle?


Messaging store relies on resource bundles to handle internationalized strings.  We use an open source library ICU to manage these resource bundles.  Generally, we saved the translation in a text file(*.properties), followed by making it as a platform dependent binary file (*.res).  In case you wish to customize these error messages or decide to create a new translation for your locale, you can follow these simple steps. 


1.  If you create a new properties file, make sure use the right name.  For exmaple, in xxxx_err_yy.properties yy can be one of the following (This is identical to RFC-2068 'Accept-Language' definition, but no q-value):

    en,de,fr,es,af,ca,da,nl,fi,gl,ga,is,it,no,pt,sv,ja,ko,zh-CN,zh-TW

2.  Create or modify a properties file.  Here is a simple example where you can change the string inside the quotation marks. :

ldapsdk_err_fr {
    LDAPSDK_SUCCESS: string { "Op\u00e9ration r\u00e9ussie" }
}

3.  Generate binary resource file.  Suppose you have your server binary at /opt/SUNWmsgsr/lib and your new bundles text files at /opt/SUNWmsgsr/lib/bundles, you can:

cd /opt/SUNWmsgsr/lib
./genrb -d bundles buldles/xxxx_err_yy.properties

  The newly generated res file will be saved in /opt/SUNWmsgsr/lib/bundles .

4.  If you have just created a new locale (xx), you have to update gen.installedlanguages:
 
  configutil -o gen.installedlanguages -v "en,de,fr,es,ja,ko,zh-CN,zh-TW,xx"

5.  Restart the server services.  The server should pick up the new strings automatically.