You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/Translator/reference/v3-0-translate.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,8 +120,9 @@ Examples of JSON responses are provided in the [examples](#examples) section.
120
120
121
121
| Headers | Description |
122
122
| --- | --- |
123
-
| X-RequestId | Value generated by the service to identify the request. It's used for troubleshooting purposes. |
124
-
| X-MT-System | Specifies the system type that was used for translation for each 'to' language requested for translation. The value is a comma-separated list of strings. Each string indicates a type: <br><br>* Custom - Request includes a custom system and at least one custom system was used during translation.<br>* Team - All other requests |
123
+
| x-requestid | Value generated by the service to identify the request. It's used for troubleshooting purposes. |
124
+
| x-mt-system | Specifies the system type that was used for translation for each 'to' language requested for translation. The value is a comma-separated list of strings. Each string indicates a type: <br><br>* Custom - Request includes a custom system and at least one custom system was used during translation.<br>* Team - All other requests |
125
+
| X-metered-usage |Specifies consumption—the number of characters for which the user has been charged—for the relative translation job request. For example, if the word "Hello" is translated from English (en) to French (fr), this field will return the value '5'.|
125
126
126
127
## Response status codes
127
128
@@ -371,14 +372,15 @@ The response is:
371
372
The alignment information starts with `0:2-0:1`, which means that the first three characters in the source text (`The`) map to the first two characters in the translated text (`La`).
372
373
373
374
#### Limitations
375
+
374
376
Obtaining alignment information is an experimental feature that we've enabled for prototyping research and experiences with potential phrase mappings. We may choose to stop supporting this feature in the future. Here are some of the notable restrictions where alignments aren't supported:
375
377
376
378
* Alignment isn't available for text in HTML format that is, textType=html
377
379
* Alignment is only returned for a subset of the language pairs:
378
-
- English to/from any other language except Chinese Traditional, Cantonese (Traditional) or Serbian (Cyrillic).
379
-
- from Japanese to Korean or from Korean to Japanese.
380
-
- from Japanese to Chinese Simplified and Chinese Simplified to Japanese.
381
-
- from Chinese Simplified to Chinese Traditional and Chinese Traditional to Chinese Simplified.
380
+
* English to/from any other language except Chinese Traditional, Cantonese (Traditional) or Serbian (Cyrillic).
381
+
* from Japanese to Korean or from Korean to Japanese.
382
+
* from Japanese to Chinese Simplified and Chinese Simplified to Japanese.
383
+
* from Chinese Simplified to Chinese Traditional and Chinese Traditional to Chinese Simplified.
382
384
* You won't receive alignment if the sentence is a canned translation. Example of a canned translation is "This is a test", "I love you" and other high frequency sentences.
383
385
* Alignment isn't available when you apply any of the approaches to prevent translation as described [here](../prevent-translation.md)
384
386
@@ -392,7 +394,7 @@ curl -X POST "https://api.cognitive.microsofttranslator.com/translate?api-versio
Copy file name to clipboardExpand all lines: articles/cognitive-services/Translator/translator-text-apis.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -611,6 +611,8 @@ After a successful call, you should see the following response:
611
611
]
612
612
```
613
613
614
+
You can check the consumption (the number of characters for which you'll be charged) for each request through in the [**response headers: x-metered-usage**](reference/v3-0-translate.md#response-headers) field .
615
+
614
616
## Detect language
615
617
616
618
If you need translation, but don't know the language of the text, you can use the language detection operation. There's more than one way to identify the source text language. In this section, you'll learn how to use language detection using the `translate` endpoint, and the `detect` endpoint.
0 commit comments