1 minute read

Sometime ago, I made a chatbot from translating one language to another called Langur. Today, I have decided to make it open source, so that people can learn from it and make chat bots easily. It’s my very first open source repository and way of contributing to the open source community. The bot is live and it has some channels linked to it, you can test it in the demo section. It’s really simple and anyone can do. You will find the Language translation chat bot on Github. Here is a little intro about what it does and how to use it.

Langur is a translation chat bot made with Microsoft Bot Framework with Node.js and a free Google translate Api. You can read more about it on my blog.

Demo:

Fb Messenger

kik langurtranslator

Facebook page: fb.me/LangurTranslator

How it works:

In the beginning, the bot asks you for your source and target language and then it translates whatever you type into it.

To run:

Install dependencies:

npm install

Insert your appId and appPassword After installing the dependcies, create a bot on the Microsoft Bot framework. Get the appId and the appPassword. Replace these values here:


var keys = require('./keys.js'); //Remove it, used only to import appId and appPassword

// Create chat connector for communicating with the Bot Framework Service
var connector = new builder.ChatConnector({
    appId: keys.appId, //Replace with App Id from your Microsoft bot
    appPassword: keys.appPassword //Replace with App Password from your Microsoft bot
});

Or create a file named: keys.js and export these values.

Run the app

node app.js

Imgur

Install Microsoft Bot Emulator

Download and Install Microsoft Bot Framework Emulator to run on localhost.

Enter your appId and appPassword and click connect,

Imgur

Afterwards, you can interact with the bot like so:

Imgur

License

Langur - Language translation chat bot is released under GNU General Public License v3.0. Please refer to the LICENSE file for detailed information.

Copyright: Arshad Mehmood

Leave a comment