Localization

Other articles in this category

Search More Content

Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

Generate a Google Translate API Key

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.

More information is available at: https://cloud.google.com/translate/

To create your application’s API key simply follow the steps below:

1. Go to the Cloud Platform Console.

2. Create a new Project from the top bar.

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

4. From Dashboard click Enable Google Translate API

5. Search for Translate API and click Enable

google clould translation api

6. From the credentials interface, create a new API Key.

7. 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 -> Automatic Translation tab, as shown in the following screenshot.


8. 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

9. Copy your API Key for use in TranslatePress

10. Enable Automatic Translation and add Google Translate API Key in TranslatePress

For this navigate to TranslatePress -> Settings , and make sure to Enable Automatic Translation, by setting it to Yes. Then, under Translation Engine, select Google Translate v2.

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

That’s it! You can now simply navigate to the front-end of your website and browse it in the language of your choice. You’ll notice the content has been automatically translated.