Etranslate is a free and unlimited python library for translating your texts
#to install:
pip install etranslate
# to upgrade:
pip install etranslate -U
- Fast and reliable - it uses
Google translate
- Auto language detection
- Bulk translations
The quality from this service is not as good as web google translate. There is nothing we can do about it.
It's unclear whether your ip will be blocked if you relentlessly use the service. Please feedback should you find out any information.
from etranslate import translate
from etranslate import detect_laguage
# Translate to English by default
print(translate("Hallo Welt!")) # 'Hello world!'
print(translate("Hello world!", to="fa")) # '!سلام دنیا'
print(translate("Hello world!", to="de") ) # 'Hallo Welt!'
print(translate("Hello world!", src="en", to="fa")) # '!سلام دنیا'
# Detect the language of texts
print(detect_laguage("Hello world!")) # 'en'
print(detect_laguage("سلام دنیا")) # 'fa'
Python >=3.7
requests
Etranslate
makes use of a translate interface floating around the net and is for study and research purpose only.
The interface may become invalid without notice, which would render Etranslate
completely useless.
This project is licensed under the MIT License - see the LICENSE file for details