Liking cljdoc? Tell your friends :D

ty.i18n.keyword

Keyword-based translations with in-memory caching. Uses qualified keywords for storage like toddler.

Keyword-based translations with in-memory caching.
Uses qualified keywords for storage like toddler.
raw docstring

add-localecljs

(add-locale locale-mapping)

Add translations for a specific locale. Transforms the input to qualified keywords.

{:default {:save "Save"
           :cancel "Cancel"}
 :hr {:save "Spremi"
      :cancel "Odustani"}}
Add translations for a specific locale.
Transforms the input to qualified keywords.
```clojure
{:default {:save "Save"
           :cancel "Cancel"}
 :hr {:save "Spremi"
      :cancel "Odustani"}}
```
sourceraw docstring

add-translationscljs

(add-translations mapping)

Add translations to the in-memory cache. Uses Clojure's namespaced map syntax:

#:save {:default "Save"
        :hr "Spremi"
        :de "Speichern"}

This expands to:

{:save/default "Save"
 :save/hr "Spremi"
 :save/de "Speichern"}
Add translations to the in-memory cache.
Uses Clojure's namespaced map syntax:
```clojure
#:save {:default "Save"
        :hr "Spremi"
        :de "Speichern"}
```
This expands to:
```clojure
{:save/default "Save"
 :save/hr "Spremi"
 :save/de "Speichern"}
```
sourceraw docstring

clear-translations!cljs

(clear-translations!)

Clear all translations from memory

Clear all translations from memory
sourceraw docstring

load-translations!cljs

(load-translations! {:keys [format path locale]})

Asynchronously load translations from a URL. Returns a promise.

Options:

  • :format - :edn or :json (required)
  • :path - URL to load from (required)
  • :locale - If provided, transforms keys to qualified format
Asynchronously load translations from a URL.
Returns a promise.

Options:
- :format - :edn or :json (required)
- :path - URL to load from (required)
- :locale - If provided, transforms keys to qualified format
sourceraw docstring

remove-translationscljs

(remove-translations key locales)

Remove translations for specific key and locales

Remove translations for specific key and locales
sourceraw docstring

translationscljs

Atom containing all loaded translations. Stores qualified keywords only: {:keyword/locale "translation"}

Atom containing all loaded translations. 
Stores qualified keywords only:
{:keyword/locale "translation"}
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close