API Route: Detect Locale
Formatting requests
- You can use cURL, Postman, and python or javascript libraries, or any other procedure supported by REST APIs.
- The payload format is JSON.
- You must authenticate every request with a
x-api-keyheader.
Endpoints in this page
Detect Locale
Detects the locale (language) of a piece of content.
| POST https://agw.golinguist.com/linguistnow/resources/locale/detectLocale | ||
| Request Parameters | ||
| Field | Type | Description |
| translationType | string | Type of translation vendor to use for language detection Valid value: "machine" |
| text | string | The text to use for the language detection |
| contentTypeName | string | Type of content being translated Valid value: "api" |
| textType | string | Type of text that is being translated Valid values: "html", "text" |
| consumerSourceId | string | This is an automatically generated ID number. |
| Request Example (JSON) | ||
{ "translationType": "machine", "text": "string" } | ||
| Response Parameters | ||
| detectedLanguage | string | The language code for the language detected |
| Responses | ||
| Code 200 (Operation Successful) | ||
HTTP/1.1 200 OK { "detectedLanguage": en-us } | ||
| Possible Error Codes | ||
| 400 | Bad Request | |
| 500 | Internal Server Error | |
| 501 | User Error | |
| 537 | Unexpected Error | |