Skip to content

Instantly share code, notes, and snippets.

@bonkowski
Last active August 29, 2015 14:16
Show Gist options
  • Save bonkowski/c1856aade4a15eb5810c to your computer and use it in GitHub Desktop.
Save bonkowski/c1856aade4a15eb5810c to your computer and use it in GitHub Desktop.
Tower config?
(ns helsegris-client.config
(:require-macros [taoensso.tower :as tower-macros :refer (with-tscope)])
(:require [taoensso.tower :as tower]))
(def locale (atom :no))
(defonce t (tower/make-t {:fallback-locale :no
:compiled-dictionary (tower-macros/dict-compile {:no "i18n/helsegris_client_no.edn"
:en "i18n/helsegris_client_en.edn"})}))
(defn t' [key] (t @locale key))
(defn set-locale [l]
(reset! locale l))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment