Translation catalogue loading from classpath EDN resources.
SHELL FUNCTION: performs I/O (classpath resource loading).
The catalogue is a nested map: {locale-keyword {translation-key string-or-plural-map}}
Example: {:en {:user/sign-in "Sign in" :user/greeting {:one "Hello {name}" :many "Hello everyone"}} :nl {:user/sign-in "Aanmelden" :user/greeting {:one "Hallo {name}" :many "Hallo iedereen"}}}
Translation catalogue loading from classpath EDN resources.
SHELL FUNCTION: performs I/O (classpath resource loading).
The catalogue is a nested map:
{locale-keyword {translation-key string-or-plural-map}}
Example:
{:en {:user/sign-in "Sign in"
:user/greeting {:one "Hello {name}" :many "Hello everyone"}}
:nl {:user/sign-in "Aanmelden"
:user/greeting {:one "Hallo {name}" :many "Hallo iedereen"}}}(create-map-catalogue data)Create an ICatalogue backed by the given nested map.
Args: data - map of {locale-keyword {key string-or-plural-map}}
Returns: MapCatalogue record implementing ICatalogue
Create an ICatalogue backed by the given nested map.
Args:
data - map of {locale-keyword {key string-or-plural-map}}
Returns:
MapCatalogue record implementing ICatalogue(load-catalogue base-paths)(load-catalogue base-paths locales)Load translation catalogue from classpath EDN files.
Discovers locales by attempting to load known locale files. Each locale file must be at: {base-path}/{locale}.edn
Args: base-path - classpath directory, e.g. "wagoe/i18n/translations" locales - (optional) seq of locale keywords to load; defaults to [:en :nl]
Returns: Nested map {locale-keyword {key string-or-plural-map}}
Load translation catalogue from classpath EDN files.
Discovers locales by attempting to load known locale files.
Each locale file must be at: {base-path}/{locale}.edn
Args:
base-path - classpath directory, e.g. "wagoe/i18n/translations"
locales - (optional) seq of locale keywords to load; defaults to [:en :nl]
Returns:
Nested map {locale-keyword {key string-or-plural-map}}cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |