Node.js client library

Stay organized with collections Save and categorize content based on your preferences.

This page provides reference documentation and related resources for the Translation Node.js client library.

Resource Description
Library reference Translation Node.js library reference
Language guide General guide for using Node.js with GCP
GitHub repository Source code and additional documentation for this library
Quickstart Introduction to using this library
Stack Overflow Questions tagged with Translation and Node.js

Installation

To install the client library:

For more on setting up your Node.js development environment, refer to the Node.js Development Environment Setup Guide.

npm install --save @google-cloud/translate

Using the client library

To use the Node.js client library for Cloud Translation - Advanced, you must instantiate the Cloud Translation API client as follows:

const {TranslationServiceClient} = require('@google-cloud/translate');

See how to translate text for additional usage details.