Skip to content

v1.1

Compare
Choose a tag to compare
@Animenosekai Animenosekai released this 07 Feb 16:37
· 255 commits to main since this release
af32ace

translatepy v1.1!

[fix]
We fixed multiple bugs, including #2 which prevented the translation of long sentences.

[add]
A new attribute "service" in TranslationResult which determines which service got used for the translation

Usage:

>>> translation = translator.translate("Hello", "Japanese")
>>> translation.service
<translatepy.translators.google.GoogleTranslate object at 0x104858130>
>>> translation.service is translator.google_translate
True
>>> if translation.service is translator.bing_translate:
...    print("Used Bing Translator!")
... else:
...    print("Used other translator!")
'Used other translator!'