PromptCultureModels.MapToNearestLanguage(String) Method

Definition

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

public static string MapToNearestLanguage (string cultureCode);
static member MapToNearestLanguage : string -> string
Public Shared Function MapToNearestLanguage (cultureCode As String) As 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/.NET/Microsoft.Recognizers.Text/Culture.cs#L66 This doesn't directly use Recognizers-Text's MapToNearestLanguage because if they add language support before we do, it will break our prompts.

Applies to