Skip to content

etranslate is a free and unlimited python library for translating your texts

License

Notifications You must be signed in to change notification settings

ixabolfazl/etranslate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Etranslate

python License: MIT PyPI version

Etranslate is a free and unlimited python library for translating your texts

Install it

#to install:
pip install etranslate

# to upgrade:
pip install etranslate -U

Features

  • Fast and reliable - it uses Google translate
  • Auto language detection
  • Bulk translations

Use it

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'

Requirements

Python >=3.7
requests

Disclaimer

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.

Licenses

This project is licensed under the MIT License - see the LICENSE file for details