Created
July 28, 2014 22:37
-
-
Save Eskatrem/0a9d57f6601e53c6c19c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;clojure-code | |
(:require [compojure.core :refer :all] | |
[trads.layout :as layout] | |
[trads.util :as util] | |
[monger.core :as mg] | |
[selmer.filters :as selm]) | |
(selm/add-filter! :get-name #((first %) (second %))) | |
;;template | |
{% for item in items %} | |
{{[lang item]|get-name}} | |
{% endfor %} | |
;;items (translations-list is passed as items: | |
(def translations-list | |
[{:eng "congratulations" :fr "felicitation" :es "felicidades"}, | |
{:eng "you got it wrong" :fr "tu t'es trompe"} | |
{:eng "not translated yet"}]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment