Skip to content

paarthd00/LanguageTranslate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LanguageTranslate

Installation

npm install @google-cloud/translate

Initialization

const { Translate } = require('@google-cloud/translate').v2;
const translate = new Translate();

Translate Text

const text = 'Hello Friends!';
const target = 'hi';

async function translateText() {
    const [translations] = await translate.translate(text, target);
    console.log('Translations:', translations);
}

translateText();

Customize the text and target variables as needed for seamless text translation with the Google Cloud Translate API in JavaScript.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published