Generate Google Translate API key and enable auto-translate

In this article, you will learn:

  1. How to enable auto-translate?
  2. Steps to generate a google translate API key.

What is auto-translate?

With the Auto translate feature agents can talk with customers who speak different languages. With auto-translation, messages will automatically be translated to the preferred language of both parties. You can see its functioning on the chat screen.

  • Any incoming language will be auto-detected by the system. You can also hardcode to translate only a particular set of languages. Once a foreign language is detected, Agents can identify the language at the top of their chat input box. If needed, agents can manually change the language.
  • All incoming and outgoing messages would be translated according to the agents’ and end-users preferred language. Agents can toggle and see both the original and translated message by clicking on the label - Show translated / Show original.
  • If for any reason, the agents want to send a generic message such as an address without being translated, they can disable the auto-translate toggle in the chat input box. This will stop translation for that message alone. After that message is sent, the toggle will automatically enable itself for the translation of the next message.

drawing

1. Enable auto-translate#

Follow the steps below to enable auto-translate:

  1. Open Inbox > Settings.
  2. Search for Auto Assignment.

  1. To enable Auto to translate for Inbox, you need to generate and connect your Google Translate API key to your account by following the given steps (explained in detail in the next section):

    • Create a New Project in your Google Cloud account.
    • Activate Google Translation API service
    • Generate your API Key
    • Restrict the API usage (optional)
  2. Once your API key is validated, you would get a success notification. If not, check the API key and try again. If the issue persists, regenerate the API key.


2. Generate google translate API key#

Follow the below steps to generate the google translate API key:

  1. Go to Google Cloud Platform console and log in with your Google credentials.

Get started

  1. Create a New Project from the top menu bar. Give it a name and select Create. You will be directed to the project dashboard.

Project

New Project

Project Dashboard

  1. Click the left hamburger button and select APIs & Services.

APIs & Services

  1. Press Enable APIS and SERVICES in the Dashboard.

API Dashboard

  1. Now search for translate and click Google Cloud Translation API1.

Search

  1. Click Enable. This activates your Google Translation API service.

Enable API

note

After you have enabled API, you might be asked to enter the billing details if you haven’t done it already. You need a paid account to use Google’s Translation services.

Enable Billing

  1. To generate your API key, select the create credentials button from the screen. If you can’t find the button, Go to the credentials option from your side menu bar.

Create Credentials

  1. Click the Create credentials drop-down button and select the API key.

Create API key

  1. Your API key would be displayed in a pop-up window. You can copy and paste this into your yellow inbox account.

Your API key

  1. You can also restrict your API key to prevent unauthorized or overuse of your account. There are two types of restrictions:
    • Restrict the API on where it is being used
    • Restrict its usage quota.

Restrict API key


note
  • The cost of the Translate API is borne by the client.
  • You can either choose to auto-translate all the incoming languages or hardcode to translate only a particular set of languages. Note that if you’ve set it to auto-translate any language in the bot, it’ll likely increase the billing.
  • The translation will also work when transferring chats. For example, when agent ‘A’ whose default language is English transfers the incoming French chat to agent ‘B’ whose default language is Hindi, our system will translate all the previous messages from English to Hindi for agent ‘B’.
  • 1. Enable auto-translate
  • 2. Generate google translate API key