![]() |
![]() |
VisualAge for Java supports two means of text separation by locale: list bundles and property files. A list bundle is a persistent form of java.util.ListResourceBundle. A property file is a persistent form of java.util.PropertyResourceBundle.
Both types of resource bundle contain key-value pairs. For list resource bundles, these pairs are stored within a bundle class in the repository: ListResourceBundle.getContents( ) returns an array of key-value pairs. The key-value pairs in a property resource bundle are stored on the file system.
Each resource bundle contains values for one (or a default) locale. The name of the bundle can be keyed by locale so that the virtual machine loads the appropriate resources for the current locale setting.
VisualAge for Java supports the creation, editing, and use of resource bundles for all text found in a class. You can separate String property values as you set them from the Visual Composition Editor, or you can separate all text at once from the Workbench.
You can use your own resource bundles, or you can create them using VisualAge for Java. You can edit existing resource bundles by hand or from within VisualAge for Java. Multiple resource sources can be referenced within a single bean. VisualAge for Java generates the appropriate code the next time you save the bean.