from textblob import TextBlob
trans = TextBlob("text")
translated_text = trans.translate(to='en')
print("Translated text:", translated_text)
While running this code, I'm getting error like this:
translated_text = trans.translate(from_lang="ml",to='en')
AttributeError: 'TextBlob' object has no attribute 'translate'
Any solution for this ?