@subekti13/g-translate
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

view on npm npm module downloads per month

G-Translate

Just another nodejs module to translate text from one language to another language. Its fetches data from google translate by the way.

How to Install

npm install @subekti13/g-translate
# or
yarn add @subekti13/g-translate

How to Use

const gtranslate = require("@subekti13/g-translate");

// its asyncronous
gtranslate.translate("Selamat Siang", {from:"id", to: "ja"})
    .then((result) => {
        console.log(result)
    })
    .catch(err => {
        console.log(error)
    });

// to get list of languages use this variable
console.log(gtranslate.languages)

Response Format

  { 
    "targetText": "こんにちは",
    "romanization": "Kon'nichiwa" 
  }

Package Sidebar

Install

npm i @subekti13/g-translate

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

21.5 kB

Total Files

12

Last publish

Collaborators

  • subekti13