Text Translation Using Python
In this module you will be get to know how to translate a sentence from one language to another using one package translate in Python.
To translate from one language to another one pre-request package should be installed to get the finite output.
Translate
The Python package which helps us to do the translation from one language to another language.
pip install translate
code:
firstly we have to get the attribute called translate from Translator.
from translate import translator
and then , declare a variable and then using Translator convert which language do you need
translator=Translator(to_land="german")
store a sentence in a variable
translation=Translator.translate("I love Programming")
Project Files
/
Loading...
| .. | ||
| This directory is empty. | ||