1. Meikel Brandmeyer
  2. j18n


j18n / README.markdown

The default branch has multiple heads

# j18n – internationalisation for Clojure

*j18n* is a simple i18n library for Clojure. It uses standard Java resource
bundles to do the heavy-lifting and as such integrates well with the Java

## Basic Usage

Just call `resource` with qualified keyword to retrieve a key from the
bundle specified by the namespace part of the keyword.

    (resource ::my-message)
    (resource ::aliased-namespace/my-message)
    (resource :some.other.namespace/my-message)

The bundle name is derived from the namespace according to the usual
namespace name to file name translation rules.

Or you provide an explicit bundle:

    (resource ::my-message (ResourceBundle/getBundle "custom.package"))
    (resource :my-message  (ResourceBundle/getBundle "custom.package"))
    (resource "my-message" (ResourceBundle/getBundle "custom.package"))

## Gradle, lein and other poison

The group and artifact name is “j18n”. So to use with Gradle do:

    compile "j18n:j18n:<version>"

With lein/cake:

    [j18n <version>]