Skip to content

A lightweight, UTF-8 capable, printf() capable alternative to Java's ResourceBundle

License

Notifications You must be signed in to change notification settings

java-json-tools/msg-simple

This branch is 32 commits ahead of fge/msg-simple:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

8e46ad4 · Jun 12, 2020
Oct 30, 2019
Jun 12, 2020
Jun 25, 2013
Sep 30, 2019
Apr 12, 2014
Jun 29, 2013
Apr 12, 2014
Apr 12, 2014
Jan 6, 2020
Apr 12, 2014
Jan 7, 2020
Jan 6, 2020
Sep 9, 2019
Sep 9, 2019
Jan 6, 2020
Apr 12, 2014

Repository files navigation

License LGPLv3 License ASL 2.0 Build Status Maven Central

Read me first

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.

What this is

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 ResourceBundles.

Among features that this library offers which ResourceBundle doesn't are:

  • UTF-8 support,
  • printf()-like format for messages (in addition to the antique MessageFormat),
  • builtin assertions,
  • error resistant.

See below for more.

Versions

The current version is 1.2. Javadoc here.

See here for sample API usage.

Downloads and Maven artifact

Versions before 1.2 are available at groupId com.github.fge.

OBSOLETE You can download the jar directly on Bintray.

For Gradle:

dependencies {
    compile(group: "com.github.java-json-tools", name: "msg-simple", version: "yourVersionHere");
}

For Maven:

<dependency>
    <groupId>com.github.java-json-tools</groupId>
    <artifactId>msg-simple</artifactId>
    <version>your-version-here</version>
</dependency>

Features and roadmap

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 to MessageFormat support;
  • i18n/locale support;
  • stackable message sources;
  • builtin preconditions in bundles (checkNotNull(), checkArgument(), plus their printf()/MessageFormat equivalents);

The roadmap for future versions can be found here. Feature requests are of course welcome!

About

A lightweight, UTF-8 capable, printf() capable alternative to Java's ResourceBundle

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 96.1%
  • HTML 3.8%
  • Shell 0.1%