Skip to content

Instantly share code, notes, and snippets.

@Eskatrem
Created July 28, 2014 22:37
Show Gist options
  • Save Eskatrem/0a9d57f6601e53c6c19c to your computer and use it in GitHub Desktop.
Save Eskatrem/0a9d57f6601e53c6c19c to your computer and use it in GitHub Desktop.
;;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