Learn new languages by seeing the side-by-side translations.
Virtualenv setup:
sudo pip install virtualenv
virtualenv venv --python=python3
source venv/bin/activate
pip install -r requirements.txt
Set up Google Cloud (source https://raw.githubusercontent.com/googleapis/python-translate/master/README.rst):
In order to use this library, you first need to go through the following steps:
Store credentials in account_key
directory.
When running code, setup the environment variables:
export LANGUAGE_LEARN_GOOGLE_PROJECT=projects/project-123
export GOOGLE_APPLICATION_CREDENTIALS=./account_key/project-123.json
python main.py
You can put it into a shell script to make it simpler to launch the program. There is an example: main.sh.example. Copy it to main.sh
and update the environment variables to match what you need.