Commits

Meikel Brandmeyer committed ed59884

Add basic translate*

  • Participants
  • Parent commits 21ee899

Comments (0)

Files changed (1)

src/main/clojure/j18n/core.clj

   []
   (doseq [[v p] @bundles]
     (alter-var-root v (constantly (ResourceBundle/getBundle p)))))
+
+(defn translate*
+  "Translate the given message in the given bundle. This is basically a
+  wrapper around ResourceBundle/getString."
+  [^String message ^ResourceBundle bundle]
+  (.getString bundle message))