### File

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

### Extends

`I18nService`

### Index

###### Methods

- addResources
- getState
- init
- lazyLoadInit
- updateState
- getSignal
- Public lazyLoad
- onReady

###### Accessors

- onLangChange
- currentLanguage

### Constructor

`constructor()`

### Methods

addResources
`addResources()`
Returns : `Observable<EuiServiceStatus>`

getState
`getState()`
Returns : `Observable<I18nState>`

init
`init(i18nState?: I18nState)`

Parameters :

Name | Type | Optional
i18nState | `I18nState` | Yes

Returns : `Observable<EuiServiceStatus>`

lazyLoadInit
`lazyLoadInit()`
Returns : `Observable<EuiServiceStatus>`

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

Returns : `Observable<EuiServiceStatus>`

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.

Returns : `Observable<ModuleLoadEvent>`

### Accessors

onLangChange
get `onLangChange()`

currentLanguage
get `currentLanguage()`

# results matching ""

# No results matching ""