From 6d14a1bb553e5ca133d0bbfb51dcbdad9f61d8de Mon Sep 17 00:00:00 2001 From: Atharva Ashok Patil <39415890+Attupatil@users.noreply.github.com> Date: Thu, 1 Oct 2020 01:13:03 +0530 Subject: [PATCH] Create 35_main_translate.py --- scripts/35_main_translate.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 scripts/35_main_translate.py diff --git a/scripts/35_main_translate.py b/scripts/35_main_translate.py new file mode 100644 index 0000000..b227c18 --- /dev/null +++ b/scripts/35_main_translate.py @@ -0,0 +1,10 @@ +from translate import Translator +translator= Translator(to_lang="ja") #en es pt zh + +try : + with open('tot.txt',mode='r') as my_file: + text=my_file.read() + translation = translator.translate(text) + print(translation) +except FileNotFoundError as er: + print('you wrote wrong directory')