from GoogleFreeTrans import Translator
if __name__ == '__main__':
translator = Translator.translator(src='en', dest='zh-CN')
print(translator.translate('I love you'))
from googletrans import Translator
translator = Translator(service_urls=['translate.google.cn'])
title = 'Today is a gooday'
title_alternative = translator.translate(title, dest='zh-CN').text
print (title_alternative)
前者会以句号断句,只翻译第一句,后者会整段翻译。