This page provides reference documentation and related resources for the Cloud Translation Java client library.
Resource | Description |
---|---|
Library reference | Cloud Translation Java library reference |
Language guide | General guide for using Java with GCP |
GitHub repository | Source code and additional documentation for this library |
Quickstart | Introduction to using this library |
Stack Overflow | Questions tagged with Cloud Translation and Java |
Installation
To install the client library:
If you are using Maven, add
the following to your pom.xml
file. For more information about
BOMs, see The Google Cloud Platform Libraries BOM.
If you are using Gradle, add the following to your dependencies:
If you are using sbt, add the following to your dependencies:
If you're using Visual Studio Code, IntelliJ, or Eclipse, you can add client libraries to your project using the following IDE plugins:
The plugins provide additional functionality, such as key management for service accounts. Refer to each plugin's documentation for details.
Using the client library
To use the Java client library for Cloud Translation - Basic, you must
use the com.google.cloud.translate.v2
package.
See how to translate text for additional usage details.