1.0.1 • Published 1 year ago

translator-for-you v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

translator-for-you

A simple npm package to translate words to the specified language using Google Translate API.

Installation

npm install translator-for-you

Usage

const translate = require('translator-for-you');

// Translate 'hello' to Hindi
translate('hello', 'hi')
  .then(result => console.log(result))
  .catch(err => console.log(err));

The translate function takes two arguments:

word: The word you want to translate. language: The language you want to translate to. You can use ISO 639-1 language codes.

The language argument should be in form of ISO 639-1 codes.
Few of language ISO codes are below in the table but if the language you want is not available then click here to view more

LanguageISO 639-1
Englishen
Hindihi
Arabicar
Chinese (Simplified)zh-CN
Chinese (Traditional)zh-TW
Dutchnl
Frenchfr
Germande
Italianit
Japaneseja
Koreanko
Portuguese (Brazil)pt-BR
Russianru
Spanishes
Turkishtr
1.0.1

1 year ago

1.0.0

1 year ago