Dynamically adding content to resource bundles

Suppose you have a Flex application or website that's fully localizable (via resource bundles) and you want to make a part of the interface text editable via a content management system (such as Drupal for example). One solution I came up with was to keep my content in resource bundles and to dynamically load part of that content via a Drupal service (using AMFPHP). When the key-value pairs are loaded from Drupal, I loop through the list and add all of it to the selected bundle in the selected locale.
Before actually implementing this solution, I quickly made a sample to make sure that dynamically adding content to a resource bundle works. Yes it does, and here you have it: http://www.novio.be/demo/runtimeResources/ (right-click, view source).

For more information, read this great post on localization in Flex Builder 3.

This entry was posted in hacks. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*