{"id":2381,"date":"2023-07-11T09:56:31","date_gmt":"2023-07-11T09:56:31","guid":{"rendered":"https:\/\/www.workfall.com\/learning\/blog\/?p=2381"},"modified":"2025-09-16T04:20:28","modified_gmt":"2025-09-16T04:20:28","slug":"how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine","status":"publish","type":"post","link":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/","title":{"rendered":"How to Translate Text Using the Translate Npm Package and the Libre Engine?"},"content":{"rendered":"<span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/DHVFsBvua_E2HG00onT-Yy38JGBguGPfFNiND4Exm9hUTY1VDGMpAV-1KnVkY9HrNTLfUPBP1uBtyI4JwvVakhApcgAibO4QJUYCXekwgUsK5JQdfufRG_SBEvsxrKk-NNsxre1et8aO\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">In our interconnected world, language barriers can hinder effective communication and collaboration. Thankfully, with the advancements in machine translation, it is now easier than ever to overcome these barriers. In this blog post, we will demonstrate how to leverage the Translate NPM package, combined with the powerful Libre Engine, to seamlessly translate text between different languages.<\/p>\n\n\n\n<p>In this blog, we will cover:<\/p>\n\n\n\n<ul><li>Translate NPM Package<\/li><li>Libre Engine<\/li><li>Hands-On<\/li><li>Conclusion<\/li><\/ul>\n\n\n\n<h2>Translate NPM Package<\/h2>\n\n\n\n<p class=\"has-text-align-justify\">The Translate <a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-plot-bar-charts-in-angular-using-npm-package-highcharts\/\">NPM<\/a> package is a popular and versatile tool that provides a straightforward way to integrate translation capabilities into your JavaScript applications. It offers a range of features, including text translation, language detection, and transliteration. With its intuitive API, it allows developers to easily incorporate translation functionality into their projects.<\/p>\n\n\n\n<h2>Libre Engine<\/h2>\n\n\n\n<p class=\"has-text-align-justify\">The Libre Engine, also known as <a href=\"https:\/\/libretranslate.com\/\">LibreTranslate<\/a>, is an open-source machine translation system that serves as the backbone of the Translate NPM package. Built on the principles of openness and privacy, the Libre Engine offers a powerful translation engine that can be self-hosted, giving you full control over your translation process. It supports a wide array of languages and provides high-quality translations.<\/p>\n\n\n\n<h2>Hands-On<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/aJigdJAwf99N5Q1UBGBWr008NIBU3ln1Xm8zE4pLn0jhHws5FSRbJ7b9F064mBU1SitZAmzTEew1FFnIgDnY59TSLX27vNdY3TFb8wCF9Nsz93fc27M86HrTa9kiN64JS6uS2k-xAShJ\" alt=\"\"\/><\/figure>\n\n\n\n<h3>Required installations:<\/h3>\n\n\n\n<p>To perform the demo, you require the following installations:<\/p>\n\n\n\n<ul><li><strong>Node.js:<\/strong> is a platform that offers a streamlined and effective runtime environment for creating JavaScript applications focused on server-side functionality and networking capabilities.<\/li><\/ul>\n\n\n\n<ul><li><strong>Translate: <\/strong>The translate npm package allows us to efficiently and accurately perform the translations of texts\/paragraphs to target languages.<\/li><\/ul>\n\n\n\n<ul><li><strong>Node-fetch:<\/strong> The npm package is used to make HTTP requests in Node.js in turn to interact with the Web APIs.<\/li><\/ul>\n\n\n\n<p class=\"has-text-align-justify\">In this hands-on, we will see how we can translate texts\/paragraphs to different languages from a source language using the Translate package and the Libre engine.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-justify\">We will begin with creating a new directory for maintaining our code base. Followed by that, we will initialise a new node js application. Installing the translation package, we will verify the same and begin with the code.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-justify\">Executing the code we will check for the different errors. After overcoming each of the challenges and resolving the errors, we will then translate a simple set of words.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-justify\">On success, we will reframe the code to make it dynamic from static. Once done, we will then test the same with the different sets of languages.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-justify\">Finally, we will go through the different sets of engines provided by the translate package and how we can use them for performing the translation.<\/p>\n\n\n\n<p>Create a new directory on your local machine.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/I4MVqToI5mSCpmYLiDeYzHompakuiNqW6hZeBzbGZD7p-SomukJbsXsd-hysbjYo92JsHaI-2F6Jx76ItcooeYMpRAKb1zfLWVNAUEGd-5fwwexglAd23GltLKx9HId_dxl9QvBATAjo1BSfT2JqoQ\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Open the command prompt and run the command:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/vHEthZrZIOLwlUhC0g0bfOdUiYgX1iWMeoy6AocpbJ8ccz3vU8jC3O6elSCnAoQ74a7Sz8fMJPGEHxY7hOGZtXCseCMqt33CkLOYHvu9fvhtYo_4MTEb6Vw7bYMqLPecRIrh3rmypWAS3peyBym2Rw\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">If the node is properly installed on your machine, then you will see the screen below. Enter a name for the project. Press enter.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/PqVyWZ-7uXOns3fVr3ocJBdxKwvTI3pchkStENGmUWTEqV_5lrPz40Om9YlcxGrLLsUGDBrDhpD4Ma0TULllRs4a84VUG4QKNBgyp_eaao4HEA9dSMQkF9-KJUUZFuNpe6avg6Sn8FalIX45mKM3Hw\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Enter yes and press the enter key or else just press the enter key to initialise the folder creation.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/FxJSvbqq5fTe9SjV5CwuFIjfyebDh0Zhc1ptCF9iGe8tE1ZiYvxxDLmWWbhHwg-2_GVDfjl6YUpbJwiGgNeWcquMeY47kxOY3LJ6YkFa7F-pOFXc6wcDFQUWDRSZR_IgN6OfSZwVDTVpdy5AIyXNQg\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Now, in the local directory, you will see a new file with the name <em>package.json<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/bg98nybzZlLrkaC1yrIRnAC4QWRhS2-dxzRAod4OlfDsHpIuXTG_4Dv5VkLTX-pnM-UjngBtXvRuToFIf0LglVAKi6cgwWMhKwTBBs1qepkH72ECUjaZIDTvBAWtRDXB9OYCLyBRhF1rRgHl8wsqxg\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Now, open the directory in a code editor.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/z-rfVSc6EeKga528aDYXzvlL7ruK-mkw-19lbroc3L6njfd43Z7Y6Sa-Z45spj_pQwQKVZxhdTLZWp6aSfcOMDL5wfuapoPapNpr7AXqqpl-QMtx4POzmUsSutc7Ew_3vzGbECQ9BYIr81YoajeFUA\" alt=\"A screenshot of a computer\n\nDescription automatically generated with medium confidence\"\/><\/figure>\n\n\n\n<p>Open your command prompt and run the command as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/lqIi3_vltXLJ5Kwf21cwETIG-qPhcsJ-2bNJ6OQ_4gEH_dzUmcM7b3EbDldR4U9TAcBxsHhN63WYPWUrmwHw_yaXHmaUJnTTlW1Dqa1IL8_XMtUS41w7qZybW2yyZFGj6EGwEdEkOY3oA6tp9M_RPA\" alt=\"\"\/><\/figure>\n\n\n\n<p>On successful installation, you will see the screen as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/euRl7BsaZ27A1iW569jc_VfDSX-B0lzrWht2tP_3vXWO9iOIcdmOrNNAA0pGJPL5aeXmtpd--M53j5IRdi0m20x6oLuPUgQ_Xw4Go5Rnewbij-YbCqLF67m7cV-9zoaSTS6OLRbwjs_mzmybRFeSWQ\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>In the file structure, you will get to see the new folders and files created based on the packages you install.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/yHuSb6TSpOw0b9gokrcJHRPmXYkbbPGdaAx9q1RbHgjxiWuiptJSC3G_kIiA0_s3Y912-lmltKwqtId4Ie3zWfX0c9w6gV4G6q59NX_aEt2OEHnMtlmtvduu6AS77G1EG83758O4xY3zkhDGMiLw1A\" alt=\"A screenshot of a computer\n\nDescription automatically generated with low confidence\"\/><\/figure>\n\n\n\n<p>Now, post-installation if you open the package JSON file, you will see the translated package installed.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/0rqQxzjQAkAQAOcFjrcIuNn98x73ZJhl4BEujdmYxgKHBpY7Bnhv5ChCV28dJb-C-pID7jocb60v2k6LJq34DYeH1h48fUTWZsfAgP5kmilFML0mkNlqhU3JkHEohXvhcJXjDAQMVxk-e3s2H7ibbQ\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Now, right-click on the folders structure and click on create new file.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/76X4N_6LVLZtb6hGbAJ3WvMIChnf5EndA9y2qZPVYW18X2d3R9XDwm0mrd_7OCHTNNJrqnq8vUmtr6UmDrRgUDpnwv-DitcFH8QdfPKFbRATZdliZv4VnbCg9MxhJQ8FRs9xPRpk_knTYBAuGvbJxA\" alt=\"\"\/><\/figure>\n\n\n\n<p>Enter a file name and save the file as <em>index.js<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/QU1c1iJWN_u72q0LJBjHQaXfrAQeV53kM9XZAIF_RtFKl6dT4LeIWqyys4M8X-NbLriUdfg738sXRdCAh6RFRgdDMC2A7THBEKKYRu7WYtiIxuTEC1MtFcY5KItCQvYLDzlHvAsCHL_RaXQNzuTYZw\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Now import the installed library <strong>translate<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/ynCE_-Dglg8OhIAiYdfZx_01PVNV_8RQnRVFGjCYWPrc6KJb2dONZPk7FUKI1W_wz1HWPh8MCefUyed5n50j1trSrv4YUrXGlWp-MnPF9ObKNShdpmdnhqbSsCkbTQvRCv8rQPaOz6PP1UmrY3_FcA\" alt=\"A picture containing text, screenshot, font, multimedia software\n\nDescription automatically generated\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Another way of importing the package is by creating an HTML file. To do so, right-click in the folder structure and click on the new file.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/gCzYBZlrkOlqOyQdOTZNokaNWvvh_krdNbr_UdqXD8Kx2rUBpSHDg60EDWHYR5c-gYfd7n5Lj3WyMAg_ceIfZoIQkt57kx4tjiJU0elf_Yrk-l-1Fxg8o_vqQSo5UOhwT_zzix1A2bITVxBAq92M8w\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Enter the name for the file <em>index.html<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/5K5IYHrQD5QALIb3Jmm6IZ1KIH4h75HXtHbgEs-2dfBRUR2cZz4KiaaLZBMHBvdAlAjXW2dF30qQLaBZILZfpt2nfLIV4icXoeNQi554onohhCkHmeZQVrYUp2b4VjSPVzuHv5r2iQh4YRL09FQ2Ww\" alt=\"A screenshot of a computer\n\nDescription automatically generated\"\/><\/figure>\n\n\n\n<p>Import the translate CDN as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/cFlZE_XgQJavH59oRaGLN070Slc-1HD0cKiEue5p96QUYnsgRoJDaJIGqs5clmyilm--SZC00Uz9Zfa7Ho52oy4iag1RpO_LYaKtQI9Svc7R3lKhhhBswbicCf1d5eR0RZCHlAxcTuORIBfr7WMQHQ\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">For the demo purpose, we will be continuing to write the code in node js. Navigate back to the <em>index.js<\/em> file and add the engine declaration code line as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/f0PN0Q7bC79o_ROXzbJUimFApgIixneQL4lyZTVyUJQTl57o1wEp-Zr6jsk6vsFlHhURpkV_GaDEI0YCgkjXBTD7x_IGjoussojEsfeHz620xPHeoj1uX3r5uMdbJRQ1wrPsqzxJbE-rCoPIVeJlzA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">For this time of purpose, we will be using the translation engine as libre. Note that the translate package provides multiple engines and if we are to use different engines we need to have an access key for the same. In the case of Libre, we do not need an access key.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/J5deqC1iCtC_tjzhNG2mtdtBAKUHCDR-O5FlqNABjSuqjLt4pBJuTlscSOxvEADl5Bna360DCuf0Inl1oEh_LBEWvaH0yhzU9vglqxry4hbEB6UhCqwKejlecFIhk4FR_QYrKZod5LQabjBugz9lGw\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Declare a new variable using the translate package with parameters such as the word (that is to be translated) and the language&#8217;s short code (the target language to translate the word in).<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/VsSULTnTyKM-5ICmauRssc04osjRlXoujJCmMRCzlx87TT1ff3XHArx6WqUSLhyzhqh7x8wZI0HVBiNry5UV-N77kzEV6KlphSU5Ben3yYksBBk46XX1fZOdSz56n7Cp5MzoJPxm6Db_SXJY_6rYLw\" alt=\"\"\/><\/figure>\n\n\n\n<p>For this purpose, we will first translate the word in Spanish so we will use the short code as &#8216;es&#8217;.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/q0PADKXGKQFohLI-ZDiIeGhlM0uK-ibpoS4-3sw_l0KOGUbSqc3FgncPrmZSXXUbSiYaKkp5udq8qDonApAuCsXfcB4pMzxBYsnhQ6jSbc47Pga10x9yiID7vBV3-vue1VLFcv0-RElcKcwzWB-jbQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>Finally, to print the output, we will use the below <em>console.log<\/em> line.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/wgSPyFBBUDzgJs2og-Si3ratoEadKjg0_LWBhfIo-Ux_1iCXMOkuh0y1aTSwbDIWYfFOJZBbNe0NhVVnFIFIF7Y4rld85d4njLsSLCP1ry2sUOCcjWS2rQB2BV-QrlLQWqqqCDXC3CFt_05GIYsB6g\" alt=\"A blue text on a black background\n\nDescription automatically generated with medium confidence\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Now, the final code in the <em>index.js<\/em> file looks like as shown in the image below. Note that we have replaced the keyword &#8216;word&#8217; with some text.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/O9TgF4L_eVRrm0lHd5f__P6qnFs0qoeCwaBKaxfWocCL3z6EcyUvDbsXQ2KoNII-E9lMyC1aGBFgN3_uxlU6HBPKg2L8SOLZERrBR0MSS6OLa9gwOiAHmtQl5U5LQ3TbBlxCJ-6pbEQKMSmE560kTA\" alt=\"A screen shot of a computer program\n\nDescription automatically generated with low confidence\"\/><\/figure>\n\n\n\n<p>Open the command prompt and run the following line to start the server.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/UcZ7JgKhCCNlkxBo_A8eveJ70vUtthJIU3MWUsbfuDSc29yq4_iBHkucnOA-6oE-UpCG1vnV3cZLd5U87SM6-Y78sk2wr9GTAYcIYNtn_8dTlWdkbvVrnjOKn1gfeOzghB1-XDr7mgFs9wYghgvgdA\" alt=\"\"\/><\/figure>\n\n\n\n<p>When you do so, you might receive an error as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/tIimvbUwY0CNRoiYh4wvg6xJW4AAhhlzTU2LSUdclTM_YBy1k8CfvUlivtsH2Nbt0S3eRyO9E1vnVQCc3aVtn3ntI7bPbXVpUIjqxQe8VOLbRx9y1u7IXGUO7GQOcLOjzguHBIaC-RyONeHuYY_WKw\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">To resolve the error, we need to change the extension of the<em> index.js<\/em> file. Right-click on the file name in the folder structure and click on Rename.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/uegis1kBhlWn5u6AY4s_qdNHWLkJuTim4cZN62z0WfTjYlIEoqbzlQRjYixuRzTFAS31KZoiDLP2HqAtevUmvGwZRBwESsZHDpbgceIOJShVoCWYo-Vabby-Pd9pGIFqh04mrAMqlfz5ADgiBC1mOg\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Rename the file with the extension as <em>index.mjs<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/VNK0ZfXrBA37BXy1GQ6T_ce550TPmCGOJVegkYiYrfeluLJZwIUZUsqBoKtimHICE2coqO045RAFoz54lmeG9QZL0a1qwvvQJZ58rK-HKIbD_majsFfi9Iy0eI-uoEFr2fjYKELfB52WEqiqsD7X8g\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Now, save the file with the same code.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/POB_I01HkrDLzM4GvI1hvWHVDJzg0GcrfL91IYDaBG_XIyGUxjdwKkpr8OtOjxXrIyxTxwxcnRaA6mcrhjPXfEHVFXMNU5iz-jHJPBB9j6QMbNJI4j8e6M_u6qrdyRenQHsh_Tw-VxTw8AGWnbfGOw\" alt=\"A screen shot of a computer program\n\nDescription automatically generated with low confidence\"\/><\/figure>\n\n\n\n<p>Run the below command to start the server again.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/JWUnrA0HbbFode-wgqq9FPVSjrGnbB4OOEYnOoKpGXl9I54tJMbVcRWa32jDYjevOFYJR2m5gexSkiwmsqa4-KJcVQ0kT8xZDxZyoWhShwHNz7xhTMJaDpAQrRBAGB0g40mk91qwnjIbV12Ox-dEGA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Doing so, you will notice that the console shows another error that the await keyword ain&#8217;t properly used. To resolve this, we need to create an async function.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/igkjp-uBmvfOUsgLtelxuarDbWkBNDoIVaxXevRGBYAOVgeiZnzyEaIoTFjamClRkK_EW1v0n8Pq9zXO3w3WlBE8cXPaqXP83EC2JNbIk_sXspTTEYfGld3g2pK1dR15pFcAN22-2yXdxF1cim_x2w\" alt=\"A screen shot of a computer\n\nDescription automatically generated with medium confidence\"\/><\/figure>\n\n\n\n<p>Create a new async function as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/FSnVo8icnGfPwAMZFGx22AWO26ocULxA2Y91gJx8o6v3C8knLsL2GUuKrxLUZH5sfL7XvaS97PDfFgX_H9ka2xQw2Gammay0bo0UCq8N3RKwGEkYnvSGdU6z-E0zCPHECKFfveEGXRhNH68ZhnL4qQ\" alt=\"A picture containing text, font, screenshot\n\nDescription automatically generated\"\/><\/figure>\n\n\n\n<p>Move the translation functioning code to the newly created function.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/MxrdFHYhllbRRc1F3P8iIVfaYG3TgnebCKAyxS_ln5BlVoeE9uCHQUnf5adg6iE_CxnbjLWfgEcTi4-ZoPxSzA5Slho0W_arYXn6d4_Di0bkDmnw4Abp6tUfVzXz2ji447vmb1YHNf6oFdihV8UTlQ\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Outside the function, give a call to the same function.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/rz3DwJDYbnZk421TDulugNRosXsK7qhP2PJvmfIM_xJhK38QbMVpJw8fqXsf91108sq9Tf7eDfoxtBmxlPjYO3x8vAz30hFRYBjb_CgAzSAPIwbtrpfJ0w60W2F5qqqKGF8ynthhnvWLsJ50Fh145w\" alt=\"A picture containing text, font, screenshot, graphics\n\nDescription automatically generated\"\/><\/figure>\n\n\n\n<p>The final code with function looks as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/c37HpUjFxwu6FZztdU92_lZn8GbXl8SYnbFSsgeL0xGW0uS2jceTREyiWRwy9EkqOfVSECeQ3SRZYvuKoMUbpkmAv9R3UvAMD3mt_wekdvRw6ajyti8-pJKwEIZ034L_fmEDNo9ca3pHkHsk2Wh8ew\" alt=\"\"\/><\/figure>\n\n\n\n<p>Now run the below command:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/go_Hn051vdDwsipJHqDEZUjH37gH8KVYo28B4s9Agzj1QOhzwy4n9FxZWblR71HNYILJOeTxgHWKTOFB0VGggymZYaYt_IvMkQtC6A5keECePprGBWWxhGtIZvqzv_CegqH6fSLZ1ELpBxyrFPJd5w\" alt=\"\"\/><\/figure>\n\n\n\n<p>Running the server, you will face another error that states that fetch is not defined.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/mqC2O0dWharxW17-BdkxC8Wjkeq4Jn1EMipNimbiHFDjk8bO4iNrffe9nYq1TfxQiINhDEL0H6mItBfpxp6N3wqe6DlXKnfPUDrSIJJjICmyrsteFlaTmiL9YJDonZq7t90s8q0lmsKamVRTCnE_Mg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Another error states that the promise is not handled properly.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/smtQ8pJ9SA6AnWwYImLlhLyvVNPvT4xlFQJSSxxy7-UfkaesO0DlknBTL4tOBw7RI6r7A5mMvkKqzY49s2p0Wed8r31XsSOEP51FehH1obyYYP4RGkRL7guYRQYfB2giEK1OK6JtmTM8NVwBsFmCnQ\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>First, we will resolve the promise error. To do so, add try and catch in the function.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/egijToyaqDKGqlhbrZT6uaK-rCqnI3ANj6GUmdp9TIgFEXCOriBPBmTZjbWM6OqT5AgNlX3Lz0KHhn3U0QrBSRwbDIp4Qlr-FHj1silkK3dXRKflI4fHfsAo0W_rhiFaddMt9HCsViGfDK37RiEnGQ\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Now re-run the server and you will see that the promises error is resolved.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/hWmTbg6NMIWOt4NtZRzpPZmZ8vcEtIFsSCjmJR_H4syIUF8bcF38wFG6K_Af7TEYMAUXFcehuVZI7WF1TY4akJBKHGbwbqIWW-w6X-37PaecCulyJFCmvAOiDPN-1EXJ7m93nn9ZsiDISKjMFlpOQw\" alt=\"\"\/><\/figure>\n\n\n\n<p>There will be just one error for fetch.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/CxqQ47j9eEz22sfYVIHPCFWFQZ5x0Q5PPe9o-fD6i1iEHWTKVcOnAPHgCL_BIq_OsO9cUf8r-zAg8JOI8us56FsPeeH-S18vPvIz9TTBT1jmPCMPZKxUtxdfanX_ILHrCFHOlVgPWTBviAfW_SsCsg\" alt=\"\"\/><\/figure>\n\n\n\n<p>To resolve that error, in the command prompt, run the command:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/FFPmAebAdpm7b-i_n6Yj4cKjOz7rWZZemxfi-rSI3q09c_W7D5B6Eo1-i_DfmVRmDifUXkVLRUGUi-zXDVC8OogtBpYRssA8UH3kbsgkE2bdlTYD6Kx9_kgvv2r0Rjo1Ocv_y7Q83nDbd95R3bRIKg\" alt=\"\"\/><\/figure>\n\n\n\n<p>On successful installation, you will see the screen as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/ATIpfyvfP41_ns8zqggA8W0tbxbGw0eZCxEoxK4aR4-5oVPPaosUGrnBhQiyn6WF_zps86zpGgWoGbNX61noDp_GZIOrdGSltVW45sxE1SsqYsU1dA-9ADxSs42edFzedkqnrqavbixmiuogdbFGsw\" alt=\"\"\/><\/figure>\n\n\n\n<p>Open the <em>package.json<\/em> file and reconfirm if the package is installed.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/dggFuiKEhaBLeO8CvSmDkyPRQXuOxVikXOyRR3lsGK1LQTRsKX3uIl81Uz4I87NH3SN4U907xcjnXuJC0bmbSouMOQZaZMgQ6dhXiLYd7b4jZw5RGZeDoRTNsGqKQPj_ftKl-Q_1hkHVbxFQDYe4JA\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Navigate back to the <em>index.mjs<\/em> file. Import fetch from the newly installed node-fetch package. Add fetch before using the translate package as shown below. Add await for the function call.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh6.googleusercontent.com\/Kgumiu12uO5wSeryROZ9YArHvSVhNtemEYJMWa7FnE0SADdPLbyf87SinEdUpgCb1XLXcIMHjh4HbtRJJXhbbNKYxZBmSdFGj5VmkKquURZLTA69H21bPFyNHjpLK1bS6mJAf6e3sj20Rx9NeTSJKw\" alt=\"\"\/><\/figure>\n\n\n\n<p>Rerun the server using the below command.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/FLm-48bOF6cBGknd6wIoykhusI3TeJYuLBBvWiJ3ltHjAgNsNUirPP5w4DNAIoqUp6-N14jB23ieVh-3AbkXWetkhZ-qqGRYBhnhlSB3TGu_w8gD7cqdA9dc7jaxf6z4xNqT-AQLLiPCDJwhwYuKSA\" alt=\"\"\/><\/figure>\n\n\n\n<p>On success, now you will finally see the translated text in Spanish.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/e_PvGgS1A7xwohMU5fFdqDwSB3BzRtwdiOI0qeBFRsuVzaPB0PWXEEyyEJB1F0SOi2rZQWYiV4gSw_fo728VZOclEEBeCJf3xisC1xnK1G3Id24PEiEIczsy3oh1QGAqDREj0fwb7wDsAB033SyAwg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Let&#8217;s dive into making the code dynamic.&nbsp;<\/p>\n\n\n\n<p>Add two parameters in the <em>translate_text<\/em> function.&nbsp;<\/p>\n\n\n\n<p>While using the translate package to translate the text, rename it with the function parameters.<\/p>\n\n\n\n<p class=\"has-text-align-justify\">While calling the function, add the text you wish to translate and the languages short code you want to translate the text into.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/_ctrpQCxfJl19LoQ18nT6dBTA3Xuf2w_bQT--K7A6syhhnCXzANIqLN2fkFqxfemuPoB611C4BMohIlmobLBZC_uNsROuPOOCV0iITOlzuwAma6sXBjv2iwgcTvXzLttVDzUWp64o1UWaeTM9ik9fA\" alt=\"\"\/><\/figure>\n\n\n\n<p>Re-run the server using the command:<\/p>\n\n\n\n<p><strong>node index.mjs<\/strong><\/p>\n\n\n\n<p>On success, you will see the translated text as shown below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/UzIF7jayhryhMiru1PTzxN0EC1GQT5xXpwOOJhnm-310WabU7mbfjSSyxjnRobJQO62YIel8pkBb5Hwj_PTMpaL0OHOtfm1LCqyBSCf15qM_UZiuiaA_JhJ2xQjwcx8odkNDd8ASgesLMm_R1d3pdg\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Now, let&#8217;s test if the code works for translating paragraphs. Outside the function, create a new variable with a paragraph in it and pass that variable as a parameter of the calling function.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/dYznE4badVYdqueBFBdhctp_jdCzncBZpccuEEPxG3PPns49G3sCt9YiaIj8Gc_KhHBZlSPYTwCIWM1Y-2qVhxnwdgd79YRkvAFon27ny602J6l9Tqi5xntMqp-1LNxsViDxeHVjF15ygPIitYJNWg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Re-run the server and on success, you will see the translated paragraph as shown in the image below in Spanish.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/ekx9QlTcNoVCzKzgb1tGM3abN3GWfGZaojMGGDBHx_bNoz2bYWmnLRFHGoym1WL9duwEuv1sj_qxo45d1OE9cXrrUNX35iES_20BlDIKUJuctogkbB8s52KKLOKokBGxeh3HGxQvEb2uU_3kTQrKnw\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Let&#8217;s test the package by translating the paragraph into French. Use the short code as fr for French.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/oM3AJH_pq5NxjWMTQqy2tT9M_oB1qM64VS4kHzy6qpiqxG9Qfpn4qGlctyv2ZEFl5OsLnenDMHsyPNoDc3aWptIaDBl6XDCsolqc7VAURX426QCSCVjhVQlhuwQLr5vY4bf8wWmZJeBqMazMUymVVA\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<p>Run the server and you will see the translated paragraph in French as shown in the image below.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh4.googleusercontent.com\/xeF4oi0SbjJOdigYuyHxUEHMuipTWOMY87ZiFISlMWPO4BYbC_y9-6iJoGWDeidN_hK1rsXAHStNlh5aN6TrqnatwcHxBd8rqvdVL7S22tmRaBShYltYM-gAIyHvW-5nPE78D4oDNek4b0X_H_dlyA\" alt=\"\"\/><\/figure>\n\n\n\n<p>As we mentioned above, we can use different engines for translation. One of which is deepl.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-justify\">To use the same, we need to signup on the deepl portal and generate a key for usage. Signing up to the portal has its own charges.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh3.googleusercontent.com\/mBHWaIqq_zoAduuS8miHvyqcorpVrqJAcuKwhI62slfsQLyqjxLsgbADmLYyEZ8gR-ZOHu6VyCWkCAFGKvMoXf-9qxWsnaUDPkuEYFpYCtIo4gkXE27ZYwANzIcGr6C5gBIKswwfx9c-HM-JJ6aQag\" alt=\"\"\/><\/figure>\n\n\n\n<p class=\"has-text-align-justify\">Similarly, we can also use the Google engine. Again, for the Google engine, we need to have a GCP account to be able to create a key for usage.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img src=\"https:\/\/lh5.googleusercontent.com\/Ou8pTH9J5Yzpw76ahkXgDpW9ZUgO3fOgerZZs58bAfHlIKNErRt35D74OeWe3Mwt6Xrj3IcjEIfrefv7Q_PyzAfIT7U3MMuuYe23IIM8ZESoiA4OE-g2I1VXSIdLAOJs9QQjfBTgxfEVNTp_UPafjQ\" alt=\"Translate Text Using the Translate Npm Package and the Libre Engine\"\/><\/figure>\n\n\n\n<h2>Conclusion<\/h2>\n\n\n\n<p class=\"has-text-align-justify\">In this blog, we demonstrated how we can translate texts\/paragraphs to different languages from a source language using the Translate package and the Libre engine.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-justify\">We began with creating a new directory for maintaining our code base. Followed by that, we then initialised a new node js application. Installing the translation package, we verified the same and began with the code. Executing the code we then checked for the different errors. Overcoming each of the challenges and resolving the errors, we translated a simple set of words.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-justify\">On success, we reframed the code to make it dynamic from static. Once done, we then tested the same with the different sets of languages.&nbsp;<\/p>\n\n\n\n<p class=\"has-text-align-justify\">Finally, we went through the different sets of engines provided by the translate package and how we can use them for performing the translation. We will come up with more such use cases in our upcoming blogs.<\/p>\n\n\n\n<p><strong>Meanwhile\u2026<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\">If you are an aspiring NPM lover and want to explore more about the above topics, here are a few of our blogs for your reference:<\/p>\n\n\n\n<ul><li><a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-make-use-of-an-npm-package-highcharts-to-plot-network-graphs-in-angular\/\">How to make use of an npm package Highcharts to plot Network Graphs in Angular?<\/a><\/li><li><a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-export-data-to-a-csv-file-using-multiple-npm-packages-in-node-js\/\">How to export data to a CSV file using multiple npm packages in Node.js?<\/a><\/li><li><a href=\"https:\/\/www.workfall.com\/learning\/blog\/how-to-plot-bar-charts-in-angular-using-npm-package-highcharts\/\">How to plot Bar Charts in Angular using npm package Highcharts?<\/a><\/li><\/ul>\n\n\n\n<p>Stay tuned to get all the updates about our upcoming blogs on the cloud and the latest technologies.<\/p>\n\n\n\n<p class=\"has-text-align-justify\"><strong>Keep Exploring -&gt; Keep Learning -&gt; Keep Mastering<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-justify\"><strong>\u00a0<\/strong>At <a href=\"https:\/\/www.workfall.com\/\">Workfall<\/a>, we strive to provide the best tech and pay opportunities to kickass coders around the world. If you\u2019re looking to work with global clients, build cutting-edge products, and make big bucks doing so, give it a shot at <a href=\"https:\/\/www.workfall.com\/partner\/\">workfall.com\/partner<\/a> today!<\/p>\n\n\n<style type=\"text\/css\"><\/style><section id='' \n                class='helpie-faq accordions faq-toggle open-first groupSettings-490__enabled' \n                data-collection='' \n                data-pagination='0' \n                data-search='0' \n                data-pagination-enabled='0'\n                role='region'\n                aria-label='FAQ Section'\n                aria-live='polite'><h3 class=\"collection-title\">Frequently Asked Questions:<\/h3><article class=\"accordion \"><div class='helpie-faq-row'><div class='helpie-faq-col helpie-faq-col-12' ><ul><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2718\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2718\"\r\n                data-id=\"post-2718\" \r\n                data-item=\"hfaq-post-2718\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q: What is the translate NPM package, and how does it work?<\/div><\/div><div id=\"accordion-content-post-2718\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2718\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><span style=\"font-weight: 400\"><strong>\u00a0A:<\/strong> It\u2019s a versatile JavaScript package offering translation, language detection, and transliteration through a simple API\u2014you can integrate translation in your apps easily.<\/span><\/p>\n<\/div><\/li><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2719\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2719\"\r\n                data-id=\"post-2719\" \r\n                data-item=\"hfaq-post-2719\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q: What\u2019s the Libre Engine (LibreTranslate), and why use it?<\/div><\/div><div id=\"accordion-content-post-2719\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2719\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><span style=\"font-weight: 400\"><strong>A:<\/strong> LibreTranslate is an open-source machine translation engine that can be self-hosted; it powers the default engine for the <\/span><span style=\"font-weight: 400\">translate<\/span><span style=\"font-weight: 400\"> package without requiring API keys.<\/span><\/p>\n<\/div><\/li><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2720\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2720\"\r\n                data-id=\"post-2720\" \r\n                data-item=\"hfaq-post-2720\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q: What setup steps and common errors should I look out for?<\/div><\/div><div id=\"accordion-content-post-2720\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2720\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Initialize a Node.js project and install <\/span><span style=\"font-weight: 400\">translate<\/span><span style=\"font-weight: 400\"> and <\/span><span style=\"font-weight: 400\">node-fetch<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Use <\/span><span style=\"font-weight: 400\">.mjs<\/span><span style=\"font-weight: 400\"> extension and async functions with <\/span><span style=\"font-weight: 400\">await<\/span><span style=\"font-weight: 400\">\n<p><\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">Handle <\/span><span style=\"font-weight: 400\">fetch is not defined<\/span><span style=\"font-weight: 400\"> by importing <\/span><span style=\"font-weight: 400\">node-fetch<\/span><span style=\"font-weight: 400\">; wrap calls in try\u2013catch to manage promises and unexpected errors.<\/span><\/p>\n<\/div><\/li><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2721\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2721\"\r\n                data-id=\"post-2721\" \r\n                data-item=\"hfaq-post-2721\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q: How can I make translation dynamic across languages and content?<\/div><\/div><div id=\"accordion-content-post-2721\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2721\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><span style=\"font-weight: 400\"><strong>\u00a0A:<\/strong> Parameterize the translation function with text and target language code. It supports translating words, sentences, or paragraphs into multiple languages.<\/span><\/p>\n<\/div><\/li><li class=\"accordion__item \"><div class=\"accordion__header \" \r\n                id=\"accordion-header-post-2722\"\r\n                role=\"button\"\r\n                aria-expanded=\"false\"\r\n                aria-controls=\"accordion-content-post-2722\"\r\n                data-id=\"post-2722\" \r\n                data-item=\"hfaq-post-2722\" \r\n                style=\"background:transparent;\" \r\n                data-tags=\"\"\r\n                tabindex=\"0\"><div class=\"accordion__title\">Q: Can I switch to other translation engines like DeepL or Google?<\/div><\/div><div id=\"accordion-content-post-2722\" \r\n                class=\"accordion__body\" \r\n                role=\"region\"\r\n                aria-labelledby=\"accordion-header-post-2722\"\r\n                style=\"background:transparent;\"><p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span><span style=\"font-weight: 400\"><strong>A:<\/strong> Yes\u2014but they require API keys. DeepL and Google engines can be used within the <\/span><span style=\"font-weight: 400\">translate<\/span><span style=\"font-weight: 400\"> package once you obtain valid credentials.<\/span><\/p>\n<\/div><\/li><\/ul><\/div><\/div><\/article><\/section>\n","protected":false},"excerpt":{"rendered":"<p><span class=\"rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\">9<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span> In our interconnected world, language barriers can hinder effective communication and collaboration. Thankfully, with the advancements in machine translation, it is now easier than ever to overcome these barriers. In this blog post, we will demonstrate how to leverage the Translate NPM package, combined with the powerful Libre Engine, to seamlessly translate text between different [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2382,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[288],"tags":[440,441,265,250,266,442,56,6],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v19.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Translate Text Using the Translate Npm Package and the Libre Engine? - The Workfall Blog<\/title>\n<meta name=\"description\" content=\"Learn how to leverage the power of the Translate NPM package and the Libre Engine to seamlessly translate text in your backend applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Translate Text Using the Translate Npm Package and the Libre Engine? - The Workfall Blog\" \/>\n<meta property=\"og:description\" content=\"Learn how to leverage the power of the Translate NPM package and the Libre Engine to seamlessly translate text in your backend applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/\" \/>\n<meta property=\"og:site_name\" content=\"The Workfall Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/facebook.com\/workfall\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-11T09:56:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-16T04:20:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@workfall\" \/>\n<meta name=\"twitter:site\" content=\"@workfall\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Workfall\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"19 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\",\"name\":\"Workfall - Hire #Kickass Coders On Demand\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/\",\"sameAs\":[\"https:\/\/www.instagram.com\/workfall\/\",\"https:\/\/www.linkedin.com\/company\/workfall\/\",\"https:\/\/facebook.com\/workfall\",\"https:\/\/twitter.com\/workfall\"],\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400\",\"contentUrl\":\"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400\",\"width\":400,\"height\":400,\"caption\":\"Workfall - Hire #Kickass Coders On Demand\"},\"image\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#website\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/\",\"name\":\"The Workfall Blog\",\"description\":\"#Tech #Remote #Jobs\",\"publisher\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learning.workfall.com\/learning\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#primaryimage\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png\",\"contentUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png\",\"width\":1200,\"height\":628,\"caption\":\"Translate Text Using the Translate Npm Package and the Libre Engine\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#webpage\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/\",\"name\":\"How to Translate Text Using the Translate Npm Package and the Libre Engine? - The Workfall Blog\",\"isPartOf\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#primaryimage\"},\"datePublished\":\"2023-07-11T09:56:31+00:00\",\"dateModified\":\"2025-09-16T04:20:28+00:00\",\"description\":\"Learn how to leverage the power of the Translate NPM package and the Libre Engine to seamlessly translate text in your backend applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/learning.workfall.com\/learning\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Translate Text Using the Translate Npm Package and the Libre Engine?\"}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#webpage\"},\"author\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a\"},\"headline\":\"How to Translate Text Using the Translate Npm Package and the Libre Engine?\",\"datePublished\":\"2023-07-11T09:56:31+00:00\",\"dateModified\":\"2025-09-16T04:20:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#webpage\"},\"wordCount\":1672,\"publisher\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png\",\"keywords\":[\"LibreEngine\",\"LibreTranslate\",\"node\",\"nodeJS\",\"npm\",\"Text\",\"translate\",\"workfall\"],\"articleSection\":[\"Backend Development\"],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a\",\"name\":\"Workfall\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png\",\"contentUrl\":\"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png\",\"caption\":\"Workfall\"},\"sameAs\":[\"https:\/\/www.workfall.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Translate Text Using the Translate Npm Package and the Libre Engine? - The Workfall Blog","description":"Learn how to leverage the power of the Translate NPM package and the Libre Engine to seamlessly translate text in your backend applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/","og_locale":"en_US","og_type":"article","og_title":"How to Translate Text Using the Translate Npm Package and the Libre Engine? - The Workfall Blog","og_description":"Learn how to leverage the power of the Translate NPM package and the Libre Engine to seamlessly translate text in your backend applications.","og_url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/","og_site_name":"The Workfall Blog","article_publisher":"https:\/\/facebook.com\/workfall","article_published_time":"2023-07-11T09:56:31+00:00","article_modified_time":"2025-09-16T04:20:28+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_creator":"@workfall","twitter_site":"@workfall","twitter_misc":{"Written by":"Workfall","Est. reading time":"19 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization","name":"Workfall - Hire #Kickass Coders On Demand","url":"https:\/\/learning.workfall.com\/learning\/blog\/","sameAs":["https:\/\/www.instagram.com\/workfall\/","https:\/\/www.linkedin.com\/company\/workfall\/","https:\/\/facebook.com\/workfall","https:\/\/twitter.com\/workfall"],"logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400","contentUrl":"https:\/\/i1.wp.com\/18.141.20.153\/learning\/blog\/wp-content\/uploads\/2021\/10\/cropped-WF_logo.png?fit=400%2C400","width":400,"height":400,"caption":"Workfall - Hire #Kickass Coders On Demand"},"image":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/logo\/image\/"}},{"@type":"WebSite","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#website","url":"https:\/\/learning.workfall.com\/learning\/blog\/","name":"The Workfall Blog","description":"#Tech #Remote #Jobs","publisher":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learning.workfall.com\/learning\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#primaryimage","url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png","contentUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png","width":1200,"height":628,"caption":"Translate Text Using the Translate Npm Package and the Libre Engine"},{"@type":"WebPage","@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#webpage","url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/","name":"How to Translate Text Using the Translate Npm Package and the Libre Engine? - The Workfall Blog","isPartOf":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#primaryimage"},"datePublished":"2023-07-11T09:56:31+00:00","dateModified":"2025-09-16T04:20:28+00:00","description":"Learn how to leverage the power of the Translate NPM package and the Libre Engine to seamlessly translate text in your backend applications.","breadcrumb":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/learning.workfall.com\/learning\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Translate Text Using the Translate Npm Package and the Libre Engine?"}]},{"@type":"Article","@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#article","isPartOf":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#webpage"},"author":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a"},"headline":"How to Translate Text Using the Translate Npm Package and the Libre Engine?","datePublished":"2023-07-11T09:56:31+00:00","dateModified":"2025-09-16T04:20:28+00:00","mainEntityOfPage":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#webpage"},"wordCount":1672,"publisher":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/#organization"},"image":{"@id":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-text-using-the-translate-npm-package-and-the-libre-engine\/#primaryimage"},"thumbnailUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png","keywords":["LibreEngine","LibreTranslate","node","nodeJS","npm","Text","translate","workfall"],"articleSection":["Backend Development"],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/cab8236044692bc5b27606b13167794a","name":"Workfall","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/learning.workfall.com\/learning\/blog\/#\/schema\/person\/image\/","url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png","contentUrl":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/09\/avatar_user_1_1693914404-96x96.png","caption":"Workfall"},"sameAs":["https:\/\/www.workfall.com"]}]}},"jetpack_featured_media_url":"https:\/\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2023\/07\/Cover-Images_Part2-1-1.png","jetpack-related-posts":[{"id":921,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-export-data-to-a-csv-file-using-multiple-npm-packages-in-node-js\/","url_meta":{"origin":2381,"position":0},"title":"How to export data to a CSV file using multiple npm packages in Node.js?","date":"April 26, 2022","format":false,"excerpt":"Node.js is a single-threaded, open-source, cross-platform runtime environment treasured by developers for server-side and networking applications. And CSV format is one of the most widely used data interchange formats; it can be imported into any database and used in almost any other system. Moreover, it is backward compatible with everything.\u2026","rel":"","context":"In &quot;Backend Development&quot;","img":{"alt_text":"How to export data to a CSV file using multiple npm packages in Node.js?","src":"https:\/\/i0.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/04\/Cover-Images_Part2-4.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":233,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-translate-chat-messages-in-different-languages-in-real-time-with-amazon-translate\/","url_meta":{"origin":2381,"position":1},"title":"How to translate chat messages in different languages in real time with Amazon Translate?","date":"October 28, 2021","format":false,"excerpt":"We are in the age of globalization! Nowadays many businesses are expanding their reach to wider audiences across the globe, which made the world a global village! Businesses across the globe require applications that are interoperable with multiple languages. So businesses have a need for scalable, reliable, and cost-effective solutions\u2026","rel":"","context":"In &quot;AWS Cloud Computing&quot;","img":{"alt_text":"Multi-Language Subtitles for Live Streaming Video","src":"https:\/\/i0.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2021\/10\/Translate.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":902,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-plot-bar-charts-in-angular-using-npm-package-highcharts\/","url_meta":{"origin":2381,"position":2},"title":"How to plot Bar Charts in Angular using npm package Highcharts?","date":"April 12, 2022","format":false,"excerpt":"Highcharts have been around since 2009 helping IT professionals, deep tech aficionados, and even recent graduates to present data in a user-friendly manner.\u00a0 It is basically a complex word for charts used by developers while in the development stage of web applications. It comes with extensive documentation, high responsiveness, and\u2026","rel":"","context":"In &quot;Frontend Development&quot;","img":{"alt_text":"Plot Bar Charts in Angular JS","src":"https:\/\/i1.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/04\/Cover-Images_Part2-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1177,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-make-use-of-an-npm-package-highcharts-to-plot-network-graphs-in-angular\/","url_meta":{"origin":2381,"position":3},"title":"How to make use of an npm package Highcharts to plot Network Graphs in Angular?","date":"August 23, 2022","format":false,"excerpt":"Angular, an open-source web application framework, is a popular choice among web developers. To create flexibility for users to plot network graphs with the provided data, we will demonstrate how to make use of an npm package Highcharts to plot Network Graphs in Angular. In this blog, we will cover:\u2026","rel":"","context":"In &quot;Frontend Development&quot;","img":{"alt_text":"Network Graphs in Angular","src":"https:\/\/i1.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/08\/Cover-Images_Part2-1-3.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1121,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-show-flash-messages-in-node-js-using-the-connect-flash-package\/","url_meta":{"origin":2381,"position":4},"title":"How to Show Flash Messages in Node.js using the Connect-flash Package?","date":"August 9, 2022","format":false,"excerpt":"The Node.js Connect-flash module is extremely useful for developers whenever a flash message needs to be sent. When a user is redirected to a specific webpage, the connect-flash module in Node.js allows developers to display a pop-up message. For example, in your Node.js demo application, you might want to notify\u2026","rel":"","context":"In &quot;Backend Development&quot;","img":{"alt_text":"Flash messages in Node.js","src":"https:\/\/i2.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/08\/Cover-Images_Part2.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1529,"url":"https:\/\/learning.workfall.com\/learning\/blog\/how-to-build-a-communication-microservice-to-send-text-messages-using-twilio-and-express\/","url_meta":{"origin":2381,"position":5},"title":"How to build a communication microservice to send text messages using Twilio and Express?","date":"December 13, 2022","format":false,"excerpt":"Twilio is all about empowering communication in a convenient and timely manner. In this blog, we will demonstrate how to build a communication microservice to send text messages using Twilio and Express. Let\u2019s get started! \ud83d\ude80 Required Installations: Node.js: It is a JavaScript runtime environment that executes JavaScript code outside\u2026","rel":"","context":"In &quot;Backend Development&quot;","img":{"alt_text":"How to build a communication microservice to send text messages using Twilio and Express?","src":"https:\/\/i0.wp.com\/learning.workfall.com\/learning\/blog\/wp-content\/uploads\/2022\/12\/Cover-Images_Part2-1-1.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/2381"}],"collection":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/comments?post=2381"}],"version-history":[{"count":4,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/2381\/revisions"}],"predecessor-version":[{"id":2725,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/posts\/2381\/revisions\/2725"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/media\/2382"}],"wp:attachment":[{"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/media?parent=2381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/categories?post=2381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/learning.workfall.com\/learning\/blog\/wp-json\/wp\/v2\/tags?post=2381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}