This project, as of version 1.0, is licensed under both LGPLv3 and ASL 2.0. See file LICENSE for more details. Versions 1.0 and lower are licensed under LGPLv3 only.
Note the "L" in "LGPL". LGPL AND GPL ARE QUITE DIFFERENT!
NOTE: this project uses Gradle as a build system. See the BUILD.md
file
for more details.
This is a lightweight, extensible message bundle API which you can use as a replacement to Java's
ResourceBundle
. It is also able to load legacy ResourceBundle
s.
Among features that this library offers which ResourceBundle
doesn't are:
- UTF-8 support,
printf()
-like format for messages (in addition to the antiqueMessageFormat
),- builtin assertions,
- error resistant.
See below for more.
The current version is 1.1. Javadoc here.
See here for sample API usage.
You can download the jar directly on Bintray.
For Gradle:
dependencies {
compile(group: "com.github.fge", name: "msg-simple", version: "yourVersionHere");
}
For Maven:
<dependency>
<groupId>com.github.fge</groupId>
<artifactId>msg-simple</artifactId>
<version>your-version-here</version>
</dependency>
This library currently has the following features:
- static or load-on-demand message sources, with configurable expiry;
- property files read using UTF-8, ISO-8859-1 or any other encoding of your choice;
printf()
-like message support in addition toMessageFormat
support;- i18n/locale support;
- stackable message sources;
- builtin preconditions in bundles (
checkNotNull()
,checkArgument()
, plus theirprintf()
/MessageFormat
equivalents);
The roadmap for future versions can be found here. Feature requests are of course welcome!