Lion Logo Lion Fundamentals Guides Components Blog Toggle darkmode

Localize: API Table

class: LocalizeManager

Fields

NamePrivacyTypeDefaultDescriptionInherited From
localepublic
loadingCompletepublic
_autoLoadOnLocaleChangeprotectedboolean!!autoLoadOnLocaleChange
_fallbackLocaleprotectedfallbackLocale
_showKeyAsFallbackprotectedshowKeyAsFallback
formatNumberOptionspublicobject{ returnIfNaN: '', /** @type {Map<string,DatePostProcessor>} */ postProcessors: new Map(), }
formatDateOptionspublicobject{ /** @type {Map<string,DatePostProcessor>} */ postProcessors: new Map(), }
_supportExternalTranslationToolsprotected

Methods

NamePrivacyDescriptionParametersReturnInherited From
_setupTranslationToolSupportprotected
teardownpublic
_setHtmlLangAttributeprotectedlocale: string
resetpublic
addDatapubliclocale: string, namespace: string, data: object
setupNamespaceLoaderpublicpattern: RegExp|string, loader: function
loadNamespacespublicnamespaces: NamespaceObject[], { locale }, options: @param {string} [options.locale] * Promise.<Object>
loadNamespacepublicnamespaceObj: NamespaceObject, { locale = this.locale }, options: @param {string} [options.locale] * Promise.<Object|void>
msgpublickeys: string | string[], vars: Object.<string,?>, opts: @param {string} [opts.locale] * string
_setupHtmlLangAttributeObserverprotected
_teardownHtmlLangAttributeObserverprotected
_isNamespaceInCacheprotectedlocale: string, namespace: string
_getCachedNamespaceLoaderPromiseprotectedlocale: string, namespace: string
_loadNamespaceDataprotectedlocale: string, namespaceObj: NamespaceObject, isDynamicImport: boolean, namespace: stringPromise.<Object|void>
_getNamespaceLoaderprotectednamespaceObj: NamespaceObject, isDynamicImport: boolean, namespace: string
_getNamespaceLoaderPromiseprotectedloader: function, locale: string, namespace: string, fallbackLocale: stringPromise.<any>
_cacheNamespaceLoaderPromiseprotectedlocale: string, namespace: string, promise: Promise.<Object|void>
_lookupNamespaceLoaderprotectednamespace: stringfunction|null
_getLangFromLocaleprotectedlocale: stringstring
addEventListenerpublictype: string, listener: EventListener, options: ...Object
removeEventListenerpublictype: string, listener: EventListener, options: ...Object
dispatchEventpublicevent: CustomEvent
_onLocaleChangedprotectednewLocale: string, oldLocale: stringundefined
_loadAllMissingprotectednewLocale: string, oldLocale: string
_getMessageForKeysprotectedkeys: string | string[], locale: stringstring | undefined
_getMessageForKeyprotectedkey: string | undefined, locale: stringstring
setDatePostProcessorForLocalepublic{ locale, postProcessor }, options: {locale:string, postProcessor:DatePostProcessor}
setNumberPostProcessorForLocalepublic{ locale, postProcessor }, options: {locale:string, postProcessor:NumberPostProcessor}

Events

NameTypeDescriptionInherited From
__localeChangingCustomEvent
localeChangedCustomEvent