PromptCultureModels class
Class container for currently-supported Culture Models in Confirm and Choice Prompt.
Properties
| Chinese | Represents the Chinese culture model with locale and language-specific settings. |
| Dutch | Represents the Dutch culture model with locale and language-specific settings. |
| English | Represents the English culture model with locale and language-specific settings. |
| French | Represents the French culture model with locale and language-specific settings. |
| German | Represents the German culture model with locale and language-specific settings. |
| get |
Retrieves a list of supported culture models. |
| Italian | Represents the Italian culture model with locale and language-specific settings. |
| Japanese | Represents the Japanese culture model with locale and language-specific settings. |
| Portuguese | Represents the Portuguese culture model with locale and language-specific settings. |
| Spanish | Represents the Spanish culture model with locale and language-specific settings. |
Methods
| map |
Normalizes a given locale string to the nearest supported language. |
Property Details
Chinese
Represents the Chinese culture model with locale and language-specific settings.
static Chinese: PromptCultureModel
Property Value
Dutch
Represents the Dutch culture model with locale and language-specific settings.
static Dutch: PromptCultureModel
Property Value
English
Represents the English culture model with locale and language-specific settings.
static English: PromptCultureModel
Property Value
French
Represents the French culture model with locale and language-specific settings.
static French: PromptCultureModel
Property Value
German
Represents the German culture model with locale and language-specific settings.
static German: PromptCultureModel
Property Value
getSupportedCultures
Retrieves a list of supported culture models.
static getSupportedCultures: () => PromptCultureModel[]
Property Value
() => PromptCultureModel[]
Italian
Represents the Italian culture model with locale and language-specific settings.
static Italian: PromptCultureModel
Property Value
Japanese
Represents the Japanese culture model with locale and language-specific settings.
static Japanese: PromptCultureModel
Property Value
Portuguese
Represents the Portuguese culture model with locale and language-specific settings.
static Portuguese: PromptCultureModel
Property Value
Spanish
Represents the Spanish culture model with locale and language-specific settings.
static Spanish: PromptCultureModel
Property Value
Method Details
mapToNearestLanguage(string)
Normalizes a given locale string to the nearest supported language.
static function mapToNearestLanguage(cultureCode: string): string
Parameters
- cultureCode
-
string
The locale string to normalize (e.g., "en-US").
Returns
string
The normalized locale string.
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.