Developers

DetectLanguage

Usage

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.

Mandatory parameters

Name Type Description
query String The value of the UQ for which you want to detected the language

Response data format

This method calls the Knowledge API’s POST /language-detector endpoint. Please refer to the Responses section of that endpoint on the Knowledge API Routes page for the response format.

Example

client.detectLanguage('What is the language of this question?');