Class: I18nContext<K
>
i18n/src.I18nContext
Type parameters
▪ K = Record
<string
, unknown
>
Implements
Constructors
new I18nContext(lang, service)
new I18nContext<
K
>(lang
,service
):I18nContext
<K
>
Parameters
▪ lang: string
▪ service: I18nService
<K
>
Returns
I18nContext
<K
>
Source
libs/i18n/src/lib/i18n.context.ts:15
Properties
id
readonly
id:number
Source
libs/i18n/src/lib/i18n.context.ts:13
lang
readonly
lang:string
Source
libs/i18n/src/lib/i18n.context.ts:16
service
readonly
service:I18nService
<K
>
Source
libs/i18n/src/lib/i18n.context.ts:17
Accessors
i18n
get
i18n():I18nContext
<K
>
Returns
I18nContext
<K
>
Source
libs/i18n/src/lib/i18n.context.ts:20
Methods
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/i18n.context.ts:62
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/i18n.context.ts:51
validate
validate(
value
,options
?):Promise
<ValidationError
[]>
Parameters
▪ value: any
▪ options?: TranslateOptions
Returns
Promise
<ValidationError
[]>
Implementation of
Source
libs/i18n/src/lib/i18n.context.ts:69
create
static
create(ctx
,next
):void
Parameters
▪ ctx: I18nContext
<Record
<string
, unknown
>>
▪ next: (...args
) => void
Returns
void
Source
libs/i18n/src/lib/i18n.context.ts:24
createAsync
static
createAsync<T
>(ctx
,next
):Promise
<T
>
Type parameters
▪ T
Parameters
▪ ctx: I18nContext
<Record
<string
, unknown
>>
▪ next: (...args
) => Promise
<T
>
Returns
Promise
<T
>
Source
libs/i18n/src/lib/i18n.context.ts:28
current
static
current<K
>(context
?):I18nContext
<K
>
Type parameters
▪ K = Record
<string
, unknown
>
Parameters
▪ context?: ArgumentsHost
Returns
I18nContext
<K
>
Source
libs/i18n/src/lib/i18n.context.ts:35
Generated using typedoc-plugin-markdown and TypeDoc