tonsky / tongue

Do-it-yourself i18n library for Clojure/Script
Eclipse Public License 1.0
307 stars 19 forks source link

Add a substitution way for map #21

Closed katsuyasu-murata closed 4 years ago

katsuyasu-murata commented 5 years ago

I hope we can substitute variables from a map like other i18n processes.

Example

I18n file

:en {
  :exception "%{user_type} %{action} in Row %{row} failed. Please contact Support."}

Exe file

(translate :en :exception {"user_type" "member" "action" "post"  "row" "135"})

Result

"member post in Row 135 failed. Please contact Support."