Use this method to retrieve the language of a user question (UQ). If the language of the UQ is not related to the language of the project instances, it returns the actual instance language.
client.detectLanguage(query: String, options: Object);
The query
is the value of the user question (UQ) for which you want to detect the language.
Name | Type | Default | Description |
---|---|---|---|
tracking | Boolean | true |
If set to true it will automatically track the language detection event. |
The response looks like this:
{
"language": "en"
}
client.detectLanguage('What is the language of this question?', {
tracking: false
});