2019-11-15 因为要翻译很多语言,所以写了个循环用谷歌来翻译
# -*- coding:utf-8 -*- #!/usr/bin/env python # coding:utf-8 from googletrans import Translator translator = Translator(service_urls=['translate.google.cn']) source = ' 绑定邮箱' array = [ 'en','zh-TW','de', 'fr', 'es','it','ja', 'ko' ,'nl','pl','pt','ru','th','vi'] for key in array: text = translator.translate(source, src='zh-cn', dest=key).text print key, text