I’ve seen B2s developed by others using Bundles to hook into standard messages used within BB, thus automatically taking advantage of the multi-lingual support within BB. They’ve done something like this:
BbResourceBundle bundle = BundleManagerFactory.getInstance().getBundle(“content”);
String stepTitle = bundle.getString(“content.item.information”);
You might have noticed that I like knowing what the code do, rather than copy/paste stuff, and I’d like to be able to hook into all of BB’s messaging capabilities. So I tried to find the documentation of this approach, however this has proven to be hard!
BundleManagerFactory is documented at http://goo.gl/abEds and usefully tells you that getInstance will return a blackboard.platform.intl.BundleManager. This class is, however, not documented – nothing, nada!! I hate using undocumented stuff as it tends to break between updates/releases! However I’ve decided that it probably is best to use this methodology, as it ensures a consistent feel to the b2 for the user, which outweighs any other complains I have, and I already are using several undocumented methods instead of deprecated ones.
So I went hunting for anything, and there really isn’t much on the resource we like to call the Internet! So the actual BB server came to help. After a search I found the en-GB files pointed to by the bundles in the folder *BB-FOLDER*\content\locale\en_GB\messages
I now have information aplenty…