Skip to main content

Zen Resources 1.0 - Type safe localization

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2003-06-27

Hi all,

Zen Resources 1.0 has just been released:

This is a simple, 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 using Localized values (e.g. server, web), however it was specifically created to work with Swing (i.e. that's what I needed it for).

If you are interested there is a Tutorial, a Busy Developer's Guide and JavaDoc for the toolkit, but in a nut shell you create resources as interfaces:

public interface MyResources
@LocalizedValue("Default localized message, substituted value 1 = '%s', substituted value 2 = '%s'")
String myLocalizedMessage(String substitution1, int substitution2);

Zen Resources will then bind this to your ResourceBundle at runtime, mapping each method to lookup keys in your resource bundle, and using the default values provided if no localized value is found (i.e. you can write your code first and worry about localization later).

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,