Skip to main content
Changes the display language of the chat widget at runtime. By default, the locale is English (en).

Syntax

Parameters

locale
string
required
A locale string representing the desired language and region.The following table details the supported locales:
savePreference
boolean
default:"false"
Determines whether the locale preference must be saved to the platform database. When set to true, the system persists the user’s locale preference and applies it in future sessions. When set to false or omitted, the locale change is temporary and applies only to the current session.

Returns

Promise<void>
A promise that resolves when the system updates the locale.

Examples

The following examples show different ways to change the locale:

Do you need practical examples?

Learn how to apply the features available for embedded chat into your implementation with guidance and examples.