Get a Google Cloud Translation Advanced key

Pro1 min read

All guides

Google Cloud Translation Advanced uses Google’s newer translation model, with more natural wording than Basic. It doesn’t use an API key: it needs a service account and its JSON key file. It ignores your Site brief and tone.

Before you start

  • A Google Cloud project with billing turned on and the Cloud Translation API enabled. Steps 1 to 4 of the Basic guide cover this.

Create the service account

  1. In Google Cloud Console, go to IAM & Admin → Service accounts.
  2. Click Create service account. Name it, for example “lango7”, and click Create and continue.
  3. Under Role, choose Cloud Translation API User. Click Continue, then Done.

Download the JSON key

  1. Click the new service account, then open the Keys tab.
  2. Click Add key → Create new key, choose JSON and click Create. A .json file downloads.
  3. Open the file in a text editor and copy everything in it, including the first { and the last }.

If Google says key creation is turned off, your organisation blocks service account keys. Ask whoever manages your Google Cloud account to allow it for this project.

Add it to Lango7

  1. Go to Translate → Settings → Translation engine.
  2. Paste the key into the Google Cloud Translation Advanced box.
  3. Under Model, pick Translation LLM (more natural) or NMT (standard, more languages).
  4. Click Test and save. Lango7 sends a short test sentence and saves the key only if it works.

Keys are stored encrypted. If you’d rather keep the key out of the database, add define( 'LANGO7_GOOGLE3_KEY', '…' ); to wp-config.php instead.

Delete the downloaded file once Lango7 has saved the key. Anyone with the file can use your translation account.