Skip to content
Snippets Groups Projects
Commit 88fbf6ec authored by Fabian Rausch's avatar Fabian Rausch
Browse files

Send source language in request to improve translation result

parent 4e469fb9
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ def read_file(path):
return data
def get_translation(text, target_lang):
args = {"auth_key": auth_key, "text": text, "target_lang": target_lang}
args = {"auth_key": auth_key, "text": text, "target_lang": target_lang, "source_lang": "DE"}
r = requests.get("https://api.deepl.com/v2/translate", params = args)
return r.text
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment