Free python library to translate text to different languages.
Project description
py-trans
Free Python library for translate text into different languages.
Supported Engines
For now py-trans supported for four translate engines (providers)
- Google Translate - "google"
- LibreTranslate - "libre"
- translate.com - "translate.com"
- MyMemory - "my_memory"
Installation
Install from pypi
pip3 install py-trans
Install from source
pip install git+https://github.com/Itz-fork/py-trans.git
Usage
Example code snippet to use py-trans
from py_trans import PyTranslator
# Create an instance of py_trans
# Choose Provider if you want, default one is google. (There are 4 providers for now)
x = PyTranslator(provider="google")
print(x.translate("Hi", "si"))
Docs
For now there is no documentation, but still you can get some help using Docstrings. Use below code for it.
from py_trans import PyTranslator
print(help(PyTranslator.translate))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-trans-0.3.tar.gz
(3.3 kB
view hashes)