Class: I18nService<K
>
i18n/src.I18nService
Type parameters
▪ K = Record
<string
, unknown
>
Implements
Constructors
new I18nService(i18nOptions, translations, supportedLanguages, logger, loaders)
new I18nService<
K
>(i18nOptions
,translations
,supportedLanguages
,logger
,loaders
):I18nService
<K
>
Parameters
▪ i18nOptions: I18nOptions
▪ translations: I18nTranslation
▪ supportedLanguages: string
[]
▪ logger: Logger
▪ loaders: I18nLoader
<unknown
>[]
Returns
I18nService
<K
>
Source
libs/i18n/src/lib/services/i18n.service.ts:38
Properties
i18nOptions
protected
readonly
i18nOptions:I18nOptions
Source
libs/i18n/src/lib/services/i18n.service.ts:40
supportedLanguages
protected
supportedLanguages:string
[]
Source
libs/i18n/src/lib/services/i18n.service.ts:44
translations
protected
translations:I18nTranslation
Source
libs/i18n/src/lib/services/i18n.service.ts:42
Methods
getSupportedLanguages
getSupportedLanguages():
string
[]
Returns
string
[]
Source
libs/i18n/src/lib/services/i18n.service.ts:114
getTranslations
getTranslations():
I18nTranslation
Returns
Source
libs/i18n/src/lib/services/i18n.service.ts:118
hbsHelper
hbsHelper<
P
>(key
,args
,options
):IfAnyOrNever
<PathValue
<K
,P
>,string
,PathValue
<K
,P
>>
Type parameters
▪ P extends string
= any
Parameters
▪ key: P
▪ args: any
▪ options: any
Returns
IfAnyOrNever
<PathValue
<K
, P
>, string
, PathValue
<K
, P
>>
Source
libs/i18n/src/lib/services/i18n.service.ts:131
refresh
refresh():
Promise
<void
>
Returns
Promise
<void
>
Source
libs/i18n/src/lib/services/i18n.service.ts:122
resolveLanguage
resolveLanguage(
lang
):string
Parameters
▪ lang: string
Returns
string
Source
libs/i18n/src/lib/services/i18n.service.ts:144
t
t<
P
,R
>(key
,options
?):IfAnyOrNever
<R
,string
,R
>
Type parameters
▪ P extends string
= any
▪ R = PathValue
<K
, P
>
Parameters
▪ key: P
▪ options?: TranslateOptions
Returns
IfAnyOrNever
<R
, string
, R
>
Implementation of
Source
libs/i18n/src/lib/services/i18n.service.ts:107
translate
translate<
P
,R
>(key
,options
?):IfAnyOrNever
<R
,string
,R
>
Type parameters
▪ P extends string
= any
▪ R = PathValue
<K
, P
>
Parameters
▪ key: P
▪ options?: TranslateOptions
Returns
IfAnyOrNever
<R
, string
, R
>
Implementation of
Source
libs/i18n/src/lib/services/i18n.service.ts:50
validate
validate(
value
,options
?):Promise
<ValidationError
[]>
Parameters
▪ value: any
▪ options?: TranslateOptions
Returns
Promise
<ValidationError
[]>
Implementation of
Source
libs/i18n/src/lib/services/i18n.service.ts:160
Generated using typedoc-plugin-markdown and TypeDoc