This project is a web application. This will allow the user to translate some text from one language to another language. Front-end - HTML, CSS, EJS, Bootstrap, Back-end - Express.js, Node.js.
Download and Install Node.js on your system.
Install express using command - npm install express
Install google-translate-api using command - npm install @vitalets/google-translate-api
1. You need to run app.js using command - node app.js
Note1: If you are not in the directory of app.js, then you need to write the full path of the app.js as - node {dir}/app.js
Note2: If the node throws some error, then try changing the 'port' in the 'app.js' file which is '5000' by default.
2. Once the server gets started, open the browser and go to address - 'http://127.0.0.1:5000/'
3. Now you have to select two languages. In the 'From' bar, select the language from which you want the translation. In the 'to' bar, select the language to which you want the translation.
4. Enter your text in the 'Text' bar and press 'Go'.
5. Cheers! You get your translated text. If that's not the case, then try again. Once you copy the translated text to your clipboard, you can click to 'Go back' to do some more awesome translations.
Submitted by Prabhanshu Chauhan (prabhanshu)
Download packets of source code on Coders Packet
Comments