Learn a new word everyday using IBM Watson's Language Translator API
- You would first need to sign-up for a free IBM Cloud account here.
- Select the Watson Language Translator service and add the service from here.
- Click on the name of the service you just created here
- Click on "Service credentials" and add a new credential.
- You can then view the credentials and copy the username and password.
- Read the documentation for the IBM Watson Language Translator API here.
- First get your Username and Password to access IBM Watson's API following the instructions above.
- Second create a file called local.py containing the following variables. Please Note that the variable names should be exactly the same as the following listed below.
- USERNAME : "Your IBM Watson API access username."
- PASSWORD : "Your IBM Watson API access password."
- SENDER_EMAIL: "The sender's email, currently only Gmail accounts are supported."
- SENDER_EMAIL_PASSWORD: "The sender's email account's password."
- RECEIVER_EMAIL: "The receiver's email address."
- Install the required packages using the command
pip install -r requirements.txt
- Currently the default language it translates from is English and the default langugae it translates to is Spanish. To change the language to translate to, you have to first change the value of the variable
LEARN_LANGUAGE
in the filetranslate.py
to one of the following supported languages.
- French
- Arabic
- Spanish
- Portuguese