Skip to content

Commit 3098635

Browse files
authored
Adding the language of source text into params
The API can detect the language of source, which is awesome. But adding '&from' along with multiple '&to' would show the capabilities of the API. And less confusing to beginners out there.
1 parent 49464cf commit 3098635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Translate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# If you encounter any issues with the base_url or path, make sure
2323
# that you are using the latest endpoint: https://docs.microsoft.com/azure/cognitive-services/translator/reference/v3-0-translate
2424
path = '/translate?api-version=3.0'
25-
params = '&to=de&to=it'
25+
params = '&from=en&to=de&to=it'
2626
constructed_url = endpoint + path + params
2727

2828
headers = {

0 commit comments

Comments
 (0)