Zen Resources 1.0 - Simplified ResourceBundle access for Swing
I've just released Zen Resources 1.0 (free and Open Source).
This is a light-weight framework for accessing localized resources in a type-safe, developer-friendly way. Anyone familiar with GWT's Messages will recognize the basic approach. It can be used with any technology (e.g. server, web), but it was specifically created to work with Swing.
For a detailed view check out the Tutorial or the Busy Developer's Guide, but in a nut shell you create resources as interfaces:
And you define your resource bundle like so:
public interface MyResources
@LocalizedValue("This is the default message'")
@LocalizedValue("This is another default message, p1=%s, p2=%s")
String anotherMessage(String param1, int param2);
Zen Resources will then bind this to your ResourceBundle at runtime, mapping each method to lookup keys, or using the default values provided if no localized value is found (i.e. you can write your code first and worry about localization later).
com.mycompany.myapp.MyResources.someMessage=This is the localized message
com.mycompany.myapp.MyResources.anotherMessage=This is another localized message, p1=%s p2=%s
Zen Resources also provides built in support for Date and Number formats, as well as special Enum handling. For more info see the docco.
Zen Resources is available for direct download and via Maven. It is very small and uses no external libraries. It also integrates well with Dependency Injection frameworks, such as Spring.
Please use the forum for feedback and bugs.
I hope you enjoy,