File

packages/core/src/lib/services/i18n/i18n.service.mock.ts

Extends

I18nService

Index

Methods
Accessors

Constructor

constructor()

Methods

addResources
addResources()
getState
getState()
Returns : Observable<I18nState>
init
init(i18nState?: I18nState)
Parameters :
Name Type Optional
i18nState I18nState Yes
lazyLoadInit
lazyLoadInit()
updateState
updateState(i18nState: I18nState)
Parameters :
Name Type Optional
i18nState I18nState No
Returns : void
getSignal
getSignal()

This method is used to get the state as readonly signal.

Returns : Signal<T>
Public lazyLoad
lazyLoad(config: I18nLoaderConfig)
Parameters :
Name Type Optional
config I18nLoaderConfig No
onReady
onReady(moduleName?: string)

A pipe function that could serve as a wrapper of another observable e.g. ngx-translate i18n.onReady('my_module').pipe(switchMap(()=>translate.get('eui.KEY'))); WARNING: onReady will emit only once for a loaded Module, going to another and then going back will not result into another emission.

fetch module name from the state.

Parameters :
Name Type Optional Description
moduleName string Yes

the name of the module that has been given through the eUI globalConfig. In case non provided fetch module name from the state.

Accessors

onLangChange
getonLangChange()
currentLanguage
getcurrentLanguage()

results matching ""

    No results matching ""