Source

j18n / src / main / clojure / j18n / core.clj

Diff from to

File src/main/clojure/j18n/core.clj

       (alter-meta! *ns* assoc ::bundle (var ~bundle-name))
       (swap! @#'bundles assoc (var ~bundle-name) ~package)
       (var ~bundle-name))))
+
+(defn init-bundles!
+  "Initialise all bundles defined with defbundle. This should only be called
+  once during application startup and initialisation."
+  []
+  (doseq [[v p] @bundles]
+    (alter-var-root v (constantly (ResourceBundle/getBundle p)))))