1.0.5 • Published 5 months ago

@indepthwebsolutions/translate v1.0.5

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

AI Translation for Node

Usage

This is package for node. It uses DeepL AI to translate source language into target language.

You need to make a registration and get a token from DeepL to run this package.

We will go through all steps in the installation process.

Installation

NPM

  npm i @indepthwebsolutions/translate

YARN

  yarn add @indepthwebsolutions/translate
  1. Sign up for DeepL's API DeepL

  2. Go to your account and copy Authentication Key for DeepL API.

  3. In your .env file add DEEP_L_API_ADDRESS and DEEP_L_API_AUTH_KEY.

  DEEP_L_API_ADDRESS=https://api-free.deepl.com/v2/translate
  DEEP_L_API_AUTH_KEY=your_key
  1. Use your key as a value to DEEP_L_API_AUTH_KEY and use the correct api address (there is a free and premium address - look at their docs).

  2. Send text to your API using POST request with the following properties: text, source_lang, target_lang.

text and target_lang and mandatory. If you skip source_lang, the source language will be detected automatically.

Usage

  import zazaDescriptionValidation from '@indepthwebsolutions/zaza-description-validation';

  const translateResponse = await translate(req.body);
1.0.5

5 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago