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.
Name | Type | Description |
---|---|---|
query | String | The value of the UQ for which you want to detected the language |
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.
client.detectLanguage('What is the language of this question?');