Skip to main content

updateLanguage()

warning

Some Languages may be disabled until we have experts staffed for them. Please reach out if you would like to use a language other than EN_US to determine availability.

This function allows you to update the language being used. If the language is updated mid-conversation, it won't take effect until the next conversation is started. Here is the function API and some example usage:

export declare enum Language {
EN_US = "EN-US"
}

/**
* Changes the Language the SDK will use for routing messages
* @param language - The new Language that will be used
*/
export const updateLanguage = async (language: Language): Promise<void>;

const someFunction = () => {
updateLanguage(Language.EN_US);
}