Generate Google API Key

Setting up API keys for Google Translate

    1. Create a new Project
    2. Go to API Services
    3. Create new API key
    4. Restrict API to particular website
    5. Restrict usage to control costs – Important!
    6. Copy API key
    7. Paste into TP Settings

In order to create a Google Translate API Key you need a paid account. Through their terms and services, Google doesn’t allow for non-paid usage of their Translation API.

https://cloud.google.com/translate/

To create your application’s API key:

Go to the Cloud Platform Console.

1. Create a new Project from the top bar.

2. With the new project selected, go to the hamburger menu to the left and visit API & Services

From Dashboard enable Google Translate API

Search for translate API and enable it

google clould translation api

3. From the credentials interface create a new API Key.

4. Restrict your API Key to a particular website

In Google Dashboard, use the HTTP Referrer provided in the description of the Google Translate API Key field in Settings -> TranslatePress, as shown in the following screenshot.

TranslatePress HTTP Referrer for Google Translate API

5. Restrict Usage of API

In order to have control over the cost of Google Translate API, it is highly recommended to set quotas to limit the usage.

Go to Google API’s & Services → Dashboard → Cloud Translation API → Quotas and set up quotas as shown in the following screenshot.

TranslatePress Google cloud translation quotas

6. Copy your API Key for use in TranslatePress

7. Enable Google Translate and add the API Key in TranslatePress

Set Google Translate field to Yes. This will uncover the Google Translate API key field. Place the API key in this field and Save Changes.