Skip to content

BaseTranslator

Defined in: packages/runtime-core/lib/i18n.d.ts:39

Extended by

Type Parameters

T extends object = {}

Constructors

new BaseTranslator()

new BaseTranslator<T>(__namedParameters): BaseTranslator<T>

Defined in: packages/runtime-core/lib/i18n.d.ts:49

Parameters

__namedParameters

TranslatorOptions<T>

Returns

BaseTranslator<T>

Accessors

isInitialized

Get Signature

get isInitialized(): boolean

Defined in: packages/runtime-core/lib/i18n.d.ts:50

Returns

boolean

Set Signature

set isInitialized(value): void

Defined in: packages/runtime-core/lib/i18n.d.ts:51

Parameters
value

boolean

Returns

void


onLanguageChange

Set Signature

set onLanguageChange(handler): void

Defined in: packages/runtime-core/lib/i18n.d.ts:52

Parameters
handler

LanguageChangeHandler

Returns

void


resolvedLanguage

Get Signature

get resolvedLanguage(): Language

Defined in: packages/runtime-core/lib/i18n.d.ts:53

Returns

Language

Methods

changeLanguage()

abstract changeLanguage(language): void

Defined in: packages/runtime-core/lib/i18n.d.ts:54

Parameters

language

Language

Returns

void


init()

init(options, targetElement): void

Defined in: packages/runtime-core/lib/i18n.d.ts:56

Parameters

options

TranslatorInitOptions

targetElement

Element

Returns

void


t()

t(key): string

Defined in: packages/runtime-core/lib/i18n.d.ts:57

Parameters

key

TranslationKey<T>

Returns

string