A do-it-yourself i18n library for Clojure and ClojureScript – Tongue (by Nikita Prokopov).
From its documentation
Tongue is very simple yet capable:
- o Dictionaries are just Clojure maps.
- o Translations are either strings, template strings or arbitrary functions.
- o No additional build steps, no runtime resource loading.
- o It comes with no built-in knowledge of world locales. It has all the tooling for you to define locales yourself though.
- o Pure Clojure implementation, no dependencies.
- o Can be used from both Clojure and ClojureScript.
In contrast with other i18n solutions relying on complex and limiting string-based syntax for defining pluralization, wording, special cases etc, Tongue lets you use arbitrary functions. It gives you convenience, code reuse and endless possibilities.
As a result you have a library that handles exaclty your case well with as much detail and precision as you need.
Earlier i18n posts
My earlier i18n related posts Lightweight i18n using DataScript and Lightweight i18n using re-frame are totally obsoleted
by the Tongue library and should only be read for their amusement
value (and perhaps some