Language detection and translation using TextBlob
The TextBlob library uses Google Translate to detect a text's language and translate TextBlobs, Sentences and Words into other languages.
Language detection and translation using TextBlob
from textblob import TextBlob blob = TextBlob("Comment vas-tu?") print(blob.detect_language()) print(blob.translate(to='es')) print(blob.translate(to='en')) print(blob.translate(to='zh'))
fr ¿Como estas tu? How are you? 你好吗?
2019-05-28T14:20:27+05:30
2019-05-28T14:20:27+05:30
Amit Arora
Amit Arora
Python Programming Tutorial
Python
Practical Solution