# Google Cloud Translation API

> The Google Translate API lets websites and programs integrate with Google Translate programmatically.

## Google Cloud Platform Dashboard

**Use Google APIs.** Enable APIS, create credentials and track your usage.

API Manager

* Dashboard. Enable API
  * Search: Translate
  * Google Cloud Translation API. The Google Translate API lets websites and programs integrate with Google Translate programmatically.
  * Enable

```bash
root@edison:~/CodeLabs/EkBalam# python gtranslate.py 
{u'translations': [{u'translatedText': u'une fleur'}, {u'translatedText': u'voiture'}]}
root@edison:~/CodeLabs/EkBalam#
```

```bash
root@edison:~/CodeLabs/EkBalam# python gcptranslate.py 
Traceback (most recent call last):
  File "gcptranslate.py", line 42, in <module>
    run_quickstart()
  File "gcptranslate.py", line 24, in run_quickstart
    translate_client = translate.Client()
  File "/usr/lib/python2.7/site-packages/google/cloud/translate/client.py", line 71, in __init__
    super(Client, self).__init__(credentials=credentials, http=http)
  File "/usr/lib/python2.7/site-packages/google/cloud/client.py", line 122, in __init__
    credentials = get_credentials()
  File "/usr/lib/python2.7/site-packages/google/cloud/credentials.py", line 87, in get_credentials
    return client.GoogleCredentials.get_application_default()
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 1288, in get_application_default
    return GoogleCredentials._get_implicit_credentials()
  File "/usr/lib/python2.7/site-packages/oauth2client/client.py", line 1278, in _get_implicit_credentials
    raise ApplicationDefaultCredentialsError(ADC_HELP_MSG)
oauth2client.client.ApplicationDefaultCredentialsError: The Application Default Credentials are not available. They are a.
root@edison:~/CodeLabs/EkBalam#
```

```bash
root@edison:~/CodeLabs/EkBalam# python gcptranslate.py 
Text: Hello, world!
Translation: �áHola Mundo!
root@edison:~/CodeLabs/EkBalam#
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://theiotlearninginitiative.gitbook.io/codelabs/cities/ek-balam/google-cloud-translation-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
