Request structure

We are going to make a request as follows:

Field Value
HTTP method POST
URL https://translation.googleapis.com/language/translate/v2/languages?key=API_KEY
Request body
// SNIPP SNIPP{ "target": "en"}// SNIPP SNIPP

 

In the previous payload, we are providing the target language in which the list of names should be returned. For instance, if we provide en, we will receive the response in English; fr will return French. You can explore this while playing with the API.

Get Google Cloud AI Services Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.