Detect Locale (/locale/detectLocale)
Detect Locale
Use this endpoint to detect the locale of text content.
| POST https://agw.golinguist.com/linguistnow/resources/locale/detectLocale | |||
| Key | Required | Value | |
| x-api-key | yes | {{your_api_key}} (See Managing your API Key.) | |
| Content-Type | yes | application/json | |
| Request Body (Format: application/json) | |||
| Key | Type | Required | Description |
| translationType | string | yes | Type of translation vendor to use Valid values: "machine" |
| text | string | yes | The text to use for the language detection |
| contentTypeName | string | no | Content channel Valid value: "api" |
| textType | string | no | Type of content that is being translated Valid values: "html", "text" |
| Request Example | |||
{
"translationType": "machine",
"text": "Detect the locale of this sentence."
} | |||
| Response Parameters | |||
| Key | Type | Description | |
| detectedLanguage | string | Locale code of the detected locale | |
| Responses | |||
| Response Example (200 OK) | |||
{
"detectedLanguage": en-us
} | |||