tripe

Translate text through Google Translate.

Usage no npm install needed!

<script type="module">
  import tripe from 'https://cdn.skypack.dev/tripe';
</script>

README

Tripe Travis CI Build Status

Translate text through Google Translate.

NPM Badge

Improvements over google-translate-api

  • Supports browsers.
  • Automatically autocorrect text.
  • Simpler interface.
  • Actively maintained.

Install

npm install tripe

Usage

const tripe = require("tripe");

(async () => {
    await tripe("Good morning", "fr")
    //=> 'Bonjour!'
})()

API

tripe(text, from, to)

tripe(text, to)

text

Type: string

The text to translate.

from

Type: string

The initial language.

to

Type: string

The target language.