MultiLanguageGeneratorBase class

Base class which applies language policy to tryGetGenerator.

Extends

Configurable

Properties

languagePolicy

Language policy required by language generator.

Methods

generate(DialogContext, string, D)

Find a language generator that matches the current context locale.

getConverter(Object)
tryGetGenerator(DialogContext, string)

Abstract method to get a language generator by locale.

Inherited Methods

configure(Record<string, unknown>)

Fluent method for configuring the object.

Property Details

languagePolicy

Language policy required by language generator.

languagePolicy: LanguagePolicy

Property Value

Method Details

generate(DialogContext, string, D)

Find a language generator that matches the current context locale.

function generate(dialogContext: DialogContext, template: string, data: D): Promise<T>

Parameters

dialogContext

DialogContext

Context for the current turn of conversation.

template

string

Template to use.

data

D

Data to bind to.

Returns

Promise<T>

A promise representing the asynchronous operation.

getConverter(Object)

function getConverter(property: Object): Converter | ConverterFactory

Parameters

property

Object

The key of the conditional selector configuration.

Returns

Converter | ConverterFactory

The converter for the selector configuration.

tryGetGenerator(DialogContext, string)

Abstract method to get a language generator by locale.

function tryGetGenerator(dialogContext: DialogContext, locale: string): { exist: boolean, result: LanguageGenerator<T, D> }

Parameters

dialogContext

DialogContext

DialogContext.

locale

string

Locale to lookup.

Returns

{ exist: boolean, result: LanguageGenerator<T, D> }

Inherited Method Details

configure(Record<string, unknown>)

Fluent method for configuring the object.

function configure(config: Record<string, unknown>): this

Parameters

config

Record<string, unknown>

Configuration settings to apply.

Returns

this

The Configurable after the operation is complete.

Inherited From Configurable.configure