Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The docs for Translator().translate indicate the following behavior:
from_lang (str) – Language to translate from. If None, will attempt to detect the language.
The translation fails if both 1) the text is not in English and 2) from_lang is not explicitly set to None.
>>>from textblob.translate import Translator >>>t = Translator() >>>t.translate('hello', to_lang='fr') u'Bonjour' # correct >>>t.translate('hola', from_lang=None, to_lang='fr') u'Bonjour' # correct >>>t.translate('hola', to_lang='fr') u'Hola' # incorrect
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The docs for Translator().translate indicate the following behavior:
The translation fails if both 1) the text is not in English and 2) from_lang is not explicitly set to None.
The text was updated successfully, but these errors were encountered: