Sample Applications

This page lists Google Cloud Translation API sample applications. We will be adding more samples to this page as they are created.

Language examples

Go

These Go code samples show you how to detect the language of text input and translate text using the Cloud Translation API.

Documentation and Go Code

Java

This Java code sample shows you how to list the API-supported languages, detect the language of text input, and translate text using the Cloud Translation API.

Documentation and Java Code

Node.js

These Node.js code samples show you how to list API-supported languages, detect the language of text input, and translate text using the Cloud Translation API.

Documentation and Node.js Code

PHP

These PHP code samples show you how to list available language codes and names, detect the language of text input, and translate text using the Cloud Translation API.

Documentation and PHP Code

Python

This Python code sample shows you how to list available languages, detect the language of text input, localize language codes to target languages, and translate text using the Cloud Translation API.

Documentation and Python Code

Ruby

This Ruby code sample shows you how to translate text to a target language.

Documentation and Ruby Code

Send feedback about...

Google Cloud Translation API Documentation