Skip to content

Commit e7f4e25

Browse files
committed
update char count charge and date
1 parent 9ffc916 commit e7f4e25

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

articles/cognitive-services/Translator/reference/v3-0-translate.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,9 @@ Examples of JSON responses are provided in the [examples](#examples) section.
120120

121121
| Headers | Description |
122122
| --- | --- |
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'.|
125126

126127
## Response status codes
127128

@@ -371,14 +372,15 @@ The response is:
371372
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`).
372373

373374
#### Limitations
375+
374376
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:
375377

376378
* Alignment isn't available for text in HTML format that is, textType=html
377379
* 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.
382384
* 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.
383385
* Alignment isn't available when you apply any of the approaches to prevent translation as described [here](../prevent-translation.md)
384386

@@ -392,7 +394,7 @@ curl -X POST "https://api.cognitive.microsofttranslator.com/translate?api-versio
392394

393395
The response is:
394396

395-
```
397+
```json
396398
[
397399
{
398400
"translations":[

articles/cognitive-services/Translator/translator-text-apis.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,8 @@ After a successful call, you should see the following response:
611611
]
612612
```
613613

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+
614616
## Detect language
615617

616618
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

Comments
 (0)