Sample applications

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

Language examples

C#

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

Documentation and C# Code

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

These Java code samples show 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

These Python code samples show 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

These Ruby 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 Ruby Code

Mobile platform examples

iOS

This iOS application shows you how to make a Cloud Translation API call to get translated text.

Documentation and iOS Code