Liking cljdoc? Tell your friends :D

ty.i18n.string

String-based translations using the original text as the key. Extends the Translator protocol for String objects.

String-based translations using the original text as the key.
Extends the Translator protocol for String objects.
raw docstring

add-string-translationcljs

(add-string-translation english-text locale translated-text)

Add a single string translation.

Example:

(add-string-translation "Select date..." :hr "Odaberite datum...")
Add a single string translation.

Example:
```clojure
(add-string-translation "Select date..." :hr "Odaberite datum...")
```
sourceraw docstring

add-string-translationscljs

(add-string-translations translations-map)

Add string translations to the cache.

Example usage:

(add-string-translations
  {"Select date..." {:hr "Odaberite datum..."
                      :de "Datum auswählen..."
                      :fr "Sélectionner une date..."
                      :es "Seleccionar fecha..."}
   "Time:" {:hr "Vrijeme:"
             :de "Zeit:"
             :fr "Heure:"
             :es "Hora:"}})
Add string translations to the cache.

Example usage:
```clojure
(add-string-translations
  {"Select date..." {:hr "Odaberite datum..."
                      :de "Datum auswählen..."
                      :fr "Sélectionner une date..."
                      :es "Seleccionar fecha..."}
   "Time:" {:hr "Vrijeme:"
             :de "Zeit:"
             :fr "Heure:"
             :es "Hora:"}})
```
sourceraw docstring

clear-string-translations!cljs

(clear-string-translations!)

Clear all string translations from memory

Clear all string translations from memory
sourceraw docstring

get-string-translationcljs

(get-string-translation text locale)

Get translation for a string in given locale. Returns original string if no translation found.

Get translation for a string in given locale.
Returns original string if no translation found.
sourceraw docstring

load-datepicker-translations!cljs

(load-datepicker-translations!)

Load common datepicker translations into the system

Load common datepicker translations into the system
sourceraw docstring

load-string-translations!cljs

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

Load string translations from a URL. Expected format: {"English text" {:locale "translation"}}

Options:

  • :format - :edn or :json (required)
  • :path - URL to load from (required)
Load string translations from a URL.
Expected format: {"English text" {:locale "translation"}}

Options:
- :format - :edn or :json (required)
- :path - URL to load from (required)
sourceraw docstring

remove-string-translationcljs

(remove-string-translation english-text locale)

Remove translation for a specific string and locale

Remove translation for a specific string and locale
sourceraw docstring

remove-string-translationscljs

(remove-string-translations english-text)

Remove all translations for a specific string

Remove all translations for a specific string
sourceraw docstring

string-translationscljs

Atom containing all string translations. Format: {"English text" {:hr "Croatian text" :de "German text" :es "Spanish text"}}

Atom containing all string translations.
Format: {"English text" {:hr "Croatian text"
                          :de "German text"
                          :es "Spanish text"}}
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