translate utils support google
- support version: python 3.0+
- pip install:
pip install translate-util
from translate_util.translate_tool import translate_other2cn,translate_other2en,translate_text
# translate other language to chinese (default use google)
print(translate_other2cn('china'))
# translate other language to english (default use google)
print(translate_other2en('中国'))
# translate other language to de ,support any language
# tl demo: zh-CN/de/fr/en/it/es/yue
print(translate_text('china', tl='de'))
any customization demand,contact me with email