A Telegram bot to use Google Translate throught the Telegram inline interface.
Write in any chat @BabelgramBot <translate from language> <translate to language> <phrase to translate>
and wait for the inline translation to load. Then click on it and it will be sent as a message.
For a list of supported language codes check: https://cloud.google.com/translate/docs/languages
Install the dependencies and devDependencies and start the server.
$ npm install -d
$ npm start
You will need to create a .env
file with the environment variables BABELGRAM_TOKEN and GOOGLE_CLOUD_API_KEY. See below for further information about where to get this information.
Deploy the app in Heroku
And set the environment variables BABELGRAM_TOKEN and GOOGLE_CLOUD_API_KEY.
- BABELGRAM_TOKEN: Get this token from the @BotFather bot in Telegram when creating a new bot
- GOOGLE_CLOUD_API_KEY: Get this token from the Google Translate API