Skip to content

Commit ba0a23e

Browse files
committed
clarify header:location requirement
1 parent cacce1c commit ba0a23e

File tree

1 file changed

+25
-38
lines changed

1 file changed

+25
-38
lines changed

articles/cognitive-services/Translator/quickstart-translator.md

Lines changed: 25 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ms.devlang: csharp, golang, java, javascript, python
1717
<!-- markdownlint-disable MD001 -->
1818
<!-- markdownlint-disable MD024 -->
1919
<!-- markdownlint-disable MD036 -->
20+
<!-- markdownlint-disable MD049 -->
2021

2122
# Quickstart: Azure Cognitive Services Translator
2223

@@ -251,8 +252,6 @@ import (
251252

252253
func main() {
253254
key := "<YOUR-TRANSLATOR-KEY>"
254-
// Add your location, also known as region. The default is global.
255-
// This is required if using a Cognitive Services resource.
256255
endpoint := "https://api.cognitive.microsofttranslator.com/"
257256
uri := endpoint + "/translate?api-version=3.0"
258257

@@ -515,22 +514,18 @@ After a successful call, you should see the following response:
515514

516515
```json
517516
[
518-
{
519-
"detectedLanguage": {
520-
"language": "en",
521-
"score": 1.0
522-
},
523-
"translations": [
524-
{
525-
"text": "J'aimerais vraiment conduire votre voiture autour du pâté de maisons plusieurs fois!",
526-
"to": "fr"
527-
},
528-
{
529-
"text": "Ngingathanda ngempela ukushayela imoto yakho endaweni evimbelayo izikhathi ezimbalwa!",
530-
"to": "zu"
531-
}
532-
]
533-
}
517+
{
518+
"translations": [
519+
{
520+
"text": "J'aimerais vraiment conduire votre voiture autour du pâté de maisons plusieurs fois!",
521+
"to": "fr"
522+
},
523+
{
524+
"text": "Ngingathanda ngempela ukushayela imoto yakho endaweni evimbelayo izikhathi ezimbalwa!",
525+
"to": "zu"
526+
}
527+
]
528+
}
534529
]
535530

536531
```
@@ -653,10 +648,6 @@ After a successful call, you should see the following response:
653648
```json
654649
[
655650
{
656-
"detectedLanguage": {
657-
"language": "en",
658-
"score": 1.0
659-
},
660651
"translations": [
661652
{
662653
"text": "J'aimerais vraiment conduire votre voiture autour du pâté de maisons plusieurs fois!",
@@ -764,22 +755,18 @@ After a successful call, you should see the following response:
764755

765756
```json
766757
[
767-
{
768-
"detectedLanguage": {
769-
"language": "en",
770-
"score": 1.0
771-
},
772-
"translations": [
773-
{
774-
"text": "J'aimerais vraiment conduire votre voiture autour du pâté de maisons plusieurs fois!",
775-
"to": "fr"
776-
},
777-
{
778-
"text": "Ngingathanda ngempela ukushayela imoto yakho endaweni evimbelayo izikhathi ezimbalwa!",
779-
"to": "zu"
780-
}
781-
]
782-
}
758+
{
759+
"translations": [
760+
{
761+
"text": "J'aimerais vraiment conduire votre voiture autour du pâté de maisons plusieurs fois!",
762+
"to": "fr"
763+
},
764+
{
765+
"text": "Ngingathanda ngempela ukushayela imoto yakho endaweni evimbelayo izikhathi ezimbalwa!",
766+
"to": "zu"
767+
}
768+
]
769+
}
783770
]
784771

785772
```

0 commit comments

Comments
 (0)