Python Translator – How to make ? English to Bengali or other Translator

Here I will show how to make a python tanslator. My translate language will be Bengali/Bangla and it will save to a file. Here I have made a short youtube video to show how to do it.



from translate import Translator
translator= Translator(to_lang="bn")

    with open('for_translation.txt', mode='r') as text_for_translation_text:
        translation = translator.translate(text_for_translation)
        with open('save_the_translation.txt', mode='w', encoding="utf-8") as text_after_translation:

except FileNotFoundError as e:
    print('Please check the file path dear user :)')


It would be a great help, if you support by sharing :)
Author: zakilive

Leave a Reply

Your email address will not be published. Required fields are marked *