Commits

Meikel Brandmeyer committed 0845830

Initial build system and README

Comments (0)

Files changed (7)

+syntax: glob
+
+build/*
+.gradle/*
+local.gradle
+# 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
+infrastructure.
+
+## Basic Usage
+
+Define a resource bundle.
+
+    (j18n/defbundle my-bundle)
+
+Or – providing an explicit package name –:
+
+    (j18n/defbundle my-bundle "optional.custom.package")
+
+Then initialise the bundle in your application start up procedure.
+
+    (defn -main
+      [& args]
+      (j18n/init-bundles!)
+      …)
+
+Then use `translate` to translate your messages.
+
+    (translate :my.message)
+
+You may also use messages from another namespace's bundle:
+
+    (translate :some.other.namespace/other.message)
+
+You may assume the following properties file for the sake of the example.
+
+    my.message = meine Nachricht
+
+## 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>]
+
+buildscript {
+    repositories { flatDir dirs: project.file("gradle") }
+    dependencies {
+        classpath "clojuresque:clojuresque:1.4.2"
+        classpath "local-dotgradle:local-dotgradle:1.0.0"
+    }
+}
+
+group = project.name
+version = "1.0.0-SNAPSHOT"
+
+apply plugin: "clojure"
+apply plugin: "local-dotgradle"
+
+defaultRepositories {
+    mavenCentral()
+}
+
+repositories {
+    flatDir dirs: project.file("gradle")
+}
+
+dependencies {
+    compile "org.clojure:clojure:1.+"
+}
Add a comment to this file

gradle/clojuresque-1.4.2.jar

Binary file added.

Add a comment to this file

gradle/local-dotgradle-1.0.0.jar

Binary file added.

Add a comment to this file

gradle/runtime-1.4.2.jar

Binary file added.

+rootProject.name = "j18n"
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.