Skip to main content
Returns the language code for the current language that the chat widget uses, for example, en for English or fr for French. If a region is specified, it returns the language and region codes, for example, pt-BR for Brazilian Portuguese.

Syntax

Parameters

None

Returns

string
The current locale code, for example, en, fr, pt-BR.

Examples

The following example gets the current locale:

Do you need practical examples?

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