Google Translate configuration

Language: English

The self-managed server can use Google Cloud Translation to translate a Database automatically. To use automatic translation, you need your own Google Cloud project and a Google Translate API key.

Until you add an API key, the “Translate <language> automatically now” button does not appear, and you can only translate Databases manually.

What is sent to Google

When a user translates a Database automatically, the server sends the text of the Database structure to Google. This includes the Database name, the names of Forms, folders and Roles, Field labels and descriptions, and the labels of choices. Records are never sent to Google.

Google charges your Google Cloud account for each character it translates. See Cloud Translation pricing for the current prices and the monthly free allowance. The self-managed server does not limit how many characters your users can translate.

Before you start

You need:

  • a Google account that can create projects in the Google Cloud console
  • a billing account in Google Cloud. Google requires billing to be set up to use the Cloud Translation API, even within the free allowance.
  • a server that can make outgoing HTTPS connections to translation.googleapis.com on port 443. If your server is behind a firewall, ask your network administrator to allow this connection.

Enabling the Cloud Translation API

  1. Open the Google Cloud console.
  2. Select an existing project, or create a project for ActivityInfo, for example “ActivityInfo Translation”.
  3. Open the Cloud Translation API page.
  4. Click “Enable”.

Creating an API key

  1. In the Google Cloud console, go to “APIs & Services”, then “Credentials”.
  2. Click “Create credentials”, then “API key”. Google creates the key and shows it.
  3. Click “Edit API key” to restrict the key.
  4. Under “API restrictions”, select “Restrict key”, then select “Cloud Translation API” only.
  5. We also recommend that you limit the key to your server. Under “Application restrictions”, select “IP addresses”, then enter the public IP address that your server uses for outgoing connections.
  6. Click “Save”, then copy the key.

Keep the key secret. Anyone with the key can translate text at your expense.

Adding the key to ActivityInfo

  1. Navigate to “Server settings”, then to “External API Keys”.
  2. Click “Edit”.
  3. Paste the key into “Google Translate API key”.
  4. Click “Save”.

ActivityInfo checks the key by translating a short test phrase before saving it. If the check fails, ActivityInfo shows the error from Google and does not save the key. The most common causes are:

  • the Cloud Translation API is not enabled for the project
  • the key is restricted to a different API, or to a different IP address
  • billing is not set up for the project
  • the server cannot connect to translation.googleapis.com

After you save the key, reload ActivityInfo in your browser. The “Translate <language> automatically now” button then appears in the Translations section of the Database settings.

Replacing or removing the key

ActivityInfo never shows the full key after you save it. “External API Keys” shows only the last four characters, so you can tell which key is in use.

To replace the key, click “Edit” and paste the new key. If you leave the field blank, ActivityInfo keeps the current key.

To remove the key, click “Edit”, then “Remove key”, then “Save”. Users can then only translate Databases manually.

You can also set the key in the Google Translate API Key setting of the configuration file. The configuration file stores the key as plain text, so make sure only administrators can read it.

Next item
Configuring SCIM user provisioning