PHP 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 PHP client library.

Resource Description
Library reference Translation PHP library reference
Language guide General guide for using PHP 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 PHP

Installation

To install the client library:

composer require google/cloud-translate

Using the client library

To use the PHP client library for Cloud Translation - Basic, you must instantiate the Cloud Translation API client as follows:

use Google\Cloud\Translate\V2\TranslateClient;

See how to translate text for additional usage details.