File

packages/core/src/lib/services/i18n/i18n.loader.ts

Index

Methods

Constructor

constructor()

Methods

Public addResources
addResources(config: I18nLoaderConfig)

Adds resources

Parameters :
Name Type Optional Description
config I18nLoaderConfig No

loader configuration

Returns : I18nResourceImpl[]

Observable | false

Public getFailedResources
getFailedResources()

Returns resources that failed

Returns : Array<LoadedResourcesError>
Public getTranslation
getTranslation(lang: string)

Gets the translations from the server

Parameters :
Name Type Optional
lang string No
Returns : Observable<TranslationObject>

Observable

Public loadResources
loadResources(resources: I18nResourceImpl[], lang: string)

Loads an array of resources, by language

Parameters :
Name Type Optional Description
resources I18nResourceImpl[] No

the definition of the resources

lang string No

the resource language to load

Returns : Observable<literal type>

Observable

Public removeResources
removeResources(removedResources: I18nResourceImpl[])

Removes resources from the loader instance

Parameters :
Name Type Optional
removedResources I18nResourceImpl[] No
Returns : void

results matching ""

    No results matching ""