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
readonlyid:number
Source
libs/i18n/src/lib/i18n.context.ts:13
lang
readonlylang:string
Source
libs/i18n/src/lib/i18n.context.ts:16
service
readonlyservice:I18nService<K>
Source
libs/i18n/src/lib/i18n.context.ts:17
Accessors
i18n
geti18n():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
staticcreate(ctx,next):void
Parameters
▪ ctx: I18nContext<Record<string, unknown>>
▪ next: (...args) => void
Returns
void
Source
libs/i18n/src/lib/i18n.context.ts:24
createAsync
staticcreateAsync<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
staticcurrent<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