Constructors
constructor
- new Translator(o?: { [key: string]: any }): Translator
Parameters
Optional
o: { [key: string]: any }
Methods
setContext
- setContext(ctx: null | string): void
Returns void
setDomain
- setDomain(domain: null | string): void
Returns void
storeGetText
- storeGetText(o: { [key: string]: any }): void
Parameters
- o: { [key: string]: any }
Returns void
translate
- translate(key: string | Translator, ...var_args: string[] | number[]): string
Parameters
- key: string | Translator
- ...var_args: string[] | number[]
Returns string
translateD
- translateD(
domain: string,
key: string,
...var_args: string[] | number[],
): string Parameters
- domain: string
- key: string
- ...var_args: string[] | number[]
Returns string
translateDN
- translateDN(
domain: string,
singular: string,
plural: string,
val: string,
...var_args: string[] | number[],
): string Parameters
- domain: string
- singular: string
- plural: string
- val: string
- ...var_args: string[] | number[]
Returns string
translateDNP
- translateDNP(
domain: string,
ctx: string,
singular: string,
plural: string,
val: string,
...var_args: string[] | number[],
): string Parameters
- domain: string
- ctx: string
- singular: string
- plural: string
- val: string
- ...var_args: string[] | number[]
Returns string
translateDP
- translateDP(
domain: string,
ctx: string,
key: string,
...var_args: string[] | number[],
): string Parameters
- domain: string
- ctx: string
- key: string
- ...var_args: string[] | number[]
Returns string
translateN
- translateN(
singular: string,
plural: string,
val: number,
...var_args: string[] | number[],
): string Parameters
- singular: string
- plural: string
- val: number
- ...var_args: string[] | number[]
Returns string
translateNP
- translateNP(
ctx: string,
singular: string,
plural: string,
val: string,
...var_args: string[] | number[],
): string Parameters
- ctx: string
- singular: string
- plural: string
- val: string
- ...var_args: string[] | number[]
Returns string
translateP
- translateP(ctx: string, key: string, ...var_args: string[] | number[]): string
Parameters
- ctx: string
- key: string
- ...var_args: string[] | number[]
Returns string
Translator
Description
creates a new instance of the translator object