Liking cljdoc? Tell your friends :D

taoensso.tower

Simple internationalization (i18n) and localization (L10n) library for Clojure/Script. Wraps standard Java/Script facilities when possible.

Simple internationalization (i18n) and localization (L10n) library for
Clojure/Script. Wraps standard Java/Script facilities when possible.
raw docstring

*locale*clj

source

*tscope*clj/s

source

->?jvm-tzclj

(->?jvm-tz)
(->?jvm-tz tz)
source

all-timezone-idsclj

source

configclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

countriesclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

country-nameclj

(country-name code display-loc)

Experimental.

Experimental.
sourceraw docstring

default-tfmt-strclj/s≠

clj
(default-tfmt-str loc fmt & args)
cljs
(default-tfmt-str _loc fmt & args)

Implementation detail. Based on enc/format.

Implementation detail. Based on `enc/format`.
sourceraw docstring

dev-mode?clj

DEPRECATED.

DEPRECATED.
sourceraw docstring

dict-compileclj

Implementation detail. Compiles text translations stored in simple development-friendly Clojure map into form required by localized text translator: {:en {:example {:foo <tr>}}} => {:example/foo {:en <decorated-tr>}}

Implementation detail.
Compiles text translations stored in simple development-friendly Clojure map
into form required by localized text translator:
  {:en {:example {:foo <tr>}}} => {:example/foo {:en <decorated-tr>}}
sourceraw docstring

dict-compile*clj/smacro

(dict-compile* dict & [opts])

Compile-time compiler.

Compile-time compiler.
sourceraw docstring

dict-loadclj

Implementation detail.

Implementation detail.
sourceraw docstring

dict-load*clj/smacro

(dict-load* dict)

Compile-time loader.

Compile-time loader.
sourceraw docstring

dictionary->xliffclj

(dictionary->xliff m)
source

example-tconfigclj

Example/test config as passed to make-t, Ring middleware, etc.

:dictionary should be a map, or named resource containing a map of form {:locale {:ns1 ... {:nsN {:key<decorator> text ...} ...} ...} ...}}.

Named resource will be watched for changes when :dev-mode? is true.

Example/test config as passed to `make-t`, Ring middleware, etc.

:dictionary should be a map, or named resource containing a map of form
{:locale {:ns1 ... {:nsN {:key<decorator> text ...} ...} ...} ...}}.

Named resource will be watched for changes when `:dev-mode?` is true.
sourceraw docstring

fallback-localeclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

fmtclj

(fmt loc x & [style])

Formats Date/Number as a string. style is <:#{date time dt}-#{default short medium long full}>, e.g. :date-full, :time-short, etc. (default :date-default).

Formats Date/Number as a string.
`style` is <:#{date time dt}-#{default short medium long full}>,
e.g. :date-full, :time-short, etc. (default :date-default).
sourceraw docstring

fmt-msgclj

(fmt-msg loc pattern & args)

Creates a localized MessageFormat and uses it to format given pattern string, substituting arguments as per MessageFormat spec.

Creates a localized MessageFormat and uses it to format given pattern string,
substituting arguments as per MessageFormat spec.
sourceraw docstring

fmt-strclj/s≠

clj
(fmt-str loc fmt & args)

Like clojure.core/format but takes a locale, doesn't throw on nil pattern.

Like clojure.core/format but takes a locale, doesn't throw on nil pattern.
cljs
(fmt-str _loc fmt & args)

Alpha - subject to change.

Alpha - subject to change.
source (clj)source (cljs)raw docstring

format-currencyclj

(format-currency x)

DEPRECATED.

DEPRECATED.
sourceraw docstring

format-dateclj

(format-date d)
(format-date style d)

DEPRECATED.

DEPRECATED.
sourceraw docstring

format-dtclj

(format-dt dt)
(format-dt dstyle tstyle dt)

DEPRECATED.

DEPRECATED.
sourceraw docstring

format-integerclj

(format-integer x)

DEPRECATED.

DEPRECATED.
sourceraw docstring

format-msgclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

format-numberclj

(format-number x)

DEPRECATED.

DEPRECATED.
sourceraw docstring

format-percentclj

(format-percent x)

DEPRECATED.

DEPRECATED.
sourceraw docstring

format-strclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

format-timeclj

(format-time t)
(format-time style t)

DEPRECATED.

DEPRECATED.
sourceraw docstring

get-countriesclj

Experimental. Useful format for [sorted] lists, stitching into maps.

Experimental. Useful format for [sorted] lists, stitching into maps.
sourceraw docstring

get-langsclj

Experimental. Useful format for [sorted] lists, stitching into maps.

Experimental. Useful format for [sorted] lists, stitching into maps.
sourceraw docstring

get-timezonesclj

Experimental. Useful format for [sorted] lists, stitching into maps.

Experimental. Useful format for [sorted] lists, stitching into maps.
sourceraw docstring

IFmtcljprotocol

pfmtclj

(pfmt x loc style)
source

iso-countriesclj

source

iso-langsclj

source

iso-languagesclj

source

jvm-localeclj

Returns valid Locale matching given name string/keyword, or throws an exception if none could be found. loc should be of form :en, :en-US, :en-US-variant, or :jvm-default.

Returns valid Locale matching given name string/keyword, or throws an
exception if none could be found. `loc` should be of form :en, :en-US,
:en-US-variant, or :jvm-default.
sourceraw docstring

kw-localeclj/s

"en_gb-var1" -> :en-gb-var1, etc.

"en_gb-var1" -> :en-gb-var1, etc.
sourceraw docstring

l-compareclj

(l-compare x y)

DEPRECATED.

DEPRECATED.
sourceraw docstring

lang-nameclj

(lang-name code & [?display-loc])

Experimental.

Experimental.
sourceraw docstring

languagesclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

lcomparatorclj

(lcomparator loc & [style])

Returns localized comparator.

Returns localized comparator.
sourceraw docstring

load-dictionary-from-map-resource!clj

(load-dictionary-from-map-resource!)
(load-dictionary-from-map-resource! resource-name & [merge?])

DEPRECATED.

DEPRECATED.
sourceraw docstring

localeclj

DEPRECATED as of v2.1.0.

DEPRECATED as of v2.1.0.
sourceraw docstring

lsortclj

(lsort loc coll & [style])

Localized sort. style e/o #{:asc :desc} (default :asc).

Localized sort. `style` e/o #{:asc :desc} (default :asc).
sourceraw docstring

major-timezone-idsclj

source

make-tclj/s

source

merge-config!clj

(merge-config! & maps)

DEPRECATED.

DEPRECATED.
sourceraw docstring

normalizeclj

(normalize s & [form])

Transforms Unicode string into W3C-recommended standard de/composition form allowing easier searching and sorting of strings. Normalization is considered good hygiene when communicating with a DB or other software.

Transforms Unicode string into W3C-recommended standard de/composition form
allowing easier searching and sorting of strings. Normalization is considered
good hygiene when communicating with a DB or other software.
sourceraw docstring

oldtclj

source

parseclj

(parse loc s & [style])

Parses date/number string as a Date/Number. See fmt for possible styles (default :number).

Parses date/number string as a Date/Number. See `fmt` for possible `style`s
(default :number).
sourceraw docstring

parse-currencyclj

(parse-currency s)

DEPRECATED.

DEPRECATED.
sourceraw docstring

parse-dateclj

(parse-date s)
(parse-date style s)

DEPRECATED.

DEPRECATED.
sourceraw docstring

parse-dtclj

(parse-dt s)
(parse-dt dstyle tstyle s)

DEPRECATED.

DEPRECATED.
sourceraw docstring

parse-integerclj

(parse-integer s)

DEPRECATED.

DEPRECATED.
sourceraw docstring

parse-Localeclj

(parse-Locale loc)

DEPRECATED: Use locale instead.

DEPRECATED: Use `locale` instead.
sourceraw docstring

parse-numberclj

(parse-number s)

DEPRECATED.

DEPRECATED.
sourceraw docstring

parse-percentclj

(parse-percent s)

DEPRECATED.

DEPRECATED.
sourceraw docstring

parse-timeclj

(parse-time s)
(parse-time style s)

DEPRECATED.

DEPRECATED.
sourceraw docstring

scopedclj/s

Merges scope keywords: (scope :a.b :c/d :e) => :a.b.c.d/e

Merges scope keywords: (scope :a.b :c/d :e) => :a.b.c.d/e
sourceraw docstring

set-config!clj

(set-config! ks val)

DEPRECATED.

DEPRECATED.
sourceraw docstring

sorted-localized-countriesclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

sorted-localized-languagesclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

sorted-timezonesclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

styleclj

(style)
(style style)

DEPRECATED.

DEPRECATED.
sourceraw docstring

tclj

(t loc tconfig k-or-ks & fmt-args)

DEPRECATED. Use make-t instead.

DEPRECATED. Use `make-t` instead.
sourceraw docstring

timezoneclj

DEPRECATED

DEPRECATED
sourceraw docstring

timezonesclj

DEPRECATED.

DEPRECATED.
sourceraw docstring

translateclj

(translate loc tconfig scope k-or-ks & fmt-args)

DEPRECATED. Use make-t instead.

DEPRECATED. Use `make-t` instead.
sourceraw docstring

try-jvm-localeclj

(try-jvm-locale loc & [lang-only?])

Like jvm-locale but returns nil if no valid matching Locale could be found.

Like `jvm-locale` but returns nil if no valid matching Locale could be found.
sourceraw docstring

try-localeclj

DEPRECATED as of v2.1.0.

DEPRECATED as of v2.1.0.
sourceraw docstring

tscopedclj/s

source

tz-ids-allclj

source

tz-ids-majorclj

source

with-localeclj/smacro

(with-locale loc & body)

DEPRECATED.

DEPRECATED.
sourceraw docstring

with-scopeclj/smacro

(with-scope translation-scope & body)

DEPRECATED.

DEPRECATED.
sourceraw docstring

with-tscopeclj/smacro

(with-tscope translation-scope & body)

Executes body with given translation scope binding.

Executes body with given translation scope binding.
sourceraw docstring

xliff->dictionaryclj

(xliff->dictionary s)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close