LocaleBuilder

Locale builder for setting and getting the current locale.

Properties

Methods

constructor

Constructor

Definition:

constructor(_doc: Y.Doc, dsl: Y.Map<any>)

Parameters:

ParameterTypeDescription
_docY.Doc-
dslY.Map-

observe

Listens for locale changes, returns an unsubscribe function.

Definition:

observe(callback: ObserveCallback): () => void

Returns: () => void

Parameters:

ParameterTypeDescription
callbackObserveCallback- Callback function

setLocale

Sets the locale.

Definition:

setLocale(locale: string)

Parameters:

ParameterTypeDescription
localestring- Locale name

getLocale

Gets the current locale.

Definition:

getLocale(): string

Returns: string

toJSON

Exports to JSON.

Definition:

toJSON(): string

Returns: string