Managed ResourceBundle API

The most common methods used to externalize or internationalize an application in Flex 2 are typically either an XML implementation or a ResourceBundle implementation. Both provide their own unique advantages and disadvantages.

XML requires additional structural data which needs to be parsed in order to retrieve specific values, and, more often than not, results in larger files sizes. ResourceBundles must load each associated .properties file at compile time. Additionally, Flex Builder also contains a bug which causes a random compiler error to occur while attempting to resolve a reference to a .properties file for a specific ResourceBundle. However this error typically can be resolved by cleaning your project.

IMHO, internationalizing and externalizing an application is much easier to do when working with ResourceBundles. Partially because they are ideal for working with locales and configurations, and also because ResourceBundles open up numerous possibilities in regards to externalizing an application, runtime class loading and so forth.

The ResourceBundleManager provides an easy to use API which allows access to multiple ResourceBundle instances from a single, centralized location. All ResourceBundle instances for an application can be added, deleted and accessed by ResourceBundleManager. ResourceBundleManager provides methods for working with a typical ResourceBundle which allows all ResourceBundle properties to be accessed as a single, virtual ResourceBundle.

The ResourceBundle API is published under the MIT License. You can download the ASDoc and swc which contains an example Managed ResourceBundle API Flex Project.

{Sorry, Comments are currently Closed! }