PromptCultureModels class

Class container for currently-supported Culture Models in Confirm and Choice Prompt.

Properties

Chinese
Dutch
English
French
German
getSupportedCultures
Italian
Japanese
Portuguese
Spanish

Methods

mapToNearestLanguage(string)

Use Recognizers-Text to normalize various potential Locale strings to a standard.

Property Details

Chinese

static Chinese: PromptCultureModel

Property Value

Dutch

static Dutch: PromptCultureModel

Property Value

English

static English: PromptCultureModel

Property Value

French

static French: PromptCultureModel

Property Value

German

static German: PromptCultureModel

Property Value

getSupportedCultures

static getSupportedCultures: () => PromptCultureModel[]

Property Value

() => PromptCultureModel[]

Italian

static Italian: PromptCultureModel

Property Value

Japanese

static Japanese: PromptCultureModel

Property Value

Portuguese

static Portuguese: PromptCultureModel

Property Value

Spanish

static Spanish: PromptCultureModel

Property Value

Method Details

mapToNearestLanguage(string)

Use Recognizers-Text to normalize various potential Locale strings to a standard.

static function mapToNearestLanguage(cultureCode: string): string

Parameters

cultureCode

string

Represents locale. Examples: "en-US, en-us, EN".

Returns

string

Normalized locale.

Remarks

This is mostly a copy/paste from https://github.com/microsoft/Recognizers-Text/blob/master/JavaScript/packages/recognizers-text/src/culture.ts#L39 This doesn't directly use Recognizers-Text's MapToNearestLanguage because if they add language support before we do, it will break our prompts.