Home | Messages

cintoo Messages

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.cintoo.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 });

License: Apache 2.0
Dependencies: Java 1.5, no third party jars
Developer blog: http://stephan.cintoo.org
Contact: stephan@codehaus.org

Downloads

The current version of Messages is 1.1-B1 and can be found here:
  • messages-1.1-B1-src.tar.gz
  • messages-1.1-B1-src.zip
  • messages-1.1-B1.jar
Older versions of Messages are archived here.

Documentation

The Beginner Guide PDF describes the basics of Messages. For extending and customizing Messages there is the Developer Guide PDF

There is a general Internationalization Guide PDF which helps with internationalization in general and gives tips and hints on internationalizing projects..

Subversion

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

Hope that helps.
  • Download
  • Documentation
  • Build server
  • Bug tracker
  • Browse Repo
  • Developer blogs
(c) 2006 cintoo