Recommended: Sing it, brah! 5 fabulous songs for developers
JW's Top 5
Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs
Page 4 of 4
Resource bundles can also be used for other localizeable resources, such as text used in Swing components like buttons and labels, or even for nontextual resources like audio files or images.
Message catalogs not only simplify the localization process, they also greatly simplify the maintenance of a product's multiple localized versions. With each release, localizers need only compare the resource bundle's previous version with the current one to know exactly what incremental localization work is required.
Using message catalogs to store exception message strings offers another hidden benefit. Once you've placed all the exception messages in a message catalog, you now have a comprehensive list of all the exception messages your application might throw. This provides an easy starting point for the documentation writer to use when creating the manual's "Troubleshooting" or "Error Messages" section. Message catalogs also make it easy for documentation writers to track changes in the resource bundles and ensure the documentation stays in sync with the software. And since error messages are arguably more a function of documentation than engineering, using resource bundles renders it more practical for the documentation writers to own the resource bundle source files, which is probably good for everyone involved -- developers and users alike.
Maintaining error message strings using message catalogs requires a bit more work up front than the obvious way of building
error messages, but it pays off in a number of ways. The ResourceBundle classes in the Java class libraries allow you to easily build message catalogs into your application. Not only does the message
catalog technique enforce a clean separation between the UI and the program logic, it also makes it easier to localize the
software and maintain localized versions, and to produce documentation that accurately reflects what the program does. As
a further bonus, because ResourceBundle classes make it simpler for people other than the developer to be involved in error message creation, they make it more likely
that the error messages will be useful to the user.
Read more about Tools & Methods in JavaWorld's Tools & Methods section.