Localized ResourceBundle subclasses
14.05.2007 by Dirk OlmesWhen working on Mule’s i18n support I stubled over a hidden gem in java. The ResourceBundle’s getResourceBundle
method will build a candidate name and look for a class with this name in the runtime before resorting to loading properties files. I’d like to play around with this feature a bit, currently I’m thinking of using plain java classes as storage for error messages. With proper class hierarchies the need to duplicate each and every message should be gone then, as the wonder of overridden methods kicks in. See ResourceBundle’s getBundle method description for detailed documentation.
Comments
There are no comments yet.
Leave a comment