File

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

Index

Methods

Constructor

constructor(prefix: string, suffix: string, compileTranslationsFn: (translations: unknown, lang: string) => void)

Resource constructor

Parameters :
Name Type Optional Description
prefix string No

the prefix of the resource

suffix string No

the suffix of the resource, optional parameter

compileTranslationsFn function No

compiler function, optional parameter

Methods

Public compileTranslations
compileTranslations(translations: unknown, lang: string)

Translations pre-processor

Parameters :
Name Type Optional Description
translations unknown No

the object to be pre-processed

lang string No

the translations language

Returns : unknown

the pre-processed translations

Public equals
equals(obj: I18nResourceImpl)

Indicates whether other object is equal-to this one.

Parameters :
Name Type Optional Description
obj I18nResourceImpl No

the reference object with which to compare

Returns : boolean

true if this object is the same as obj, false otherwise

Public getPath
getPath(lang: string)

The path to the resource

Parameters :
Name Type Optional Description
lang string No

the resource language

Returns : string

the path

results matching ""

    No results matching ""