Home | Meaxure | Messages | Gabriel

Reposita Messages

License: Apache 2.0
Status: Beta
Dependencies: Java 1.5, no third party jars
Contact: stephan@codehaus.org

Messages is a free framework to make internationalization easy for Java applications. It supports locales for threads and bundles can be associated with different packages. This allows the usage of different bundles for different parts of the application like plugins, installer or logging which probably should always be in the language of the admin :-)

Bundles can be managed and associated with packages without any changes in the code. This makes bundle management and refactoring much easier than with other solutions.

Messages supports global locales for client applications written in Swing or SWT and thread local ones for serverside web applications. Messages currently needs Java 1.5

Example:

import static api.reposita.messages.Messages.*; ... Messages.setBundle("myBundle", "only.for.this.package"); Messages.setThreadLocale(new Locale("en", "")); ... $(this, "FILES_WRITTEN", 3);

Compare this to the standard JDK i18n (adapted from the must-read Sun i18n tutorial):

Locale locale = new Locale("en", ""); ResourceBundle bundle = ResourceBundle.getBundle("myBundle", locale); ... MessageFormat formatter = new MessageFormat(""); formatter.setLocale(locale); formatter.applyPattern(messages.getString("FILES_WRITTEN")); ... formatter.format(new Object[]{ 3 });

Downloads

The current version of Messages is 1.1-B1. Sorry no binaries yet, try svn.

Older versions of Messages are archived here.

Mailing list

Currently there is a user mailing list. It can be found here.

Documentation

A developer, a beginner guide and other documentation can be found here.

Subversion

> svn co http://svn.reposita.org/svn/messages/trunk/

Hope that helps.
  • Download
  • Docs
  • Browse Repo
  • Build Server
  • Developer blogs
(c) 2007 Reposita