Conversational Actions will be deprecated on June 13, 2023. For more information, see Conversational Actions sunset.

Build localized actions

You can localize your Actions for Google Assistant to provide customized experiences for different languages and locales users set on their devices. In addition, you can restrict access to your Actions based on regions, or the physical location of your users.

Before moving on, it's useful to know a few terms to understand how you can cater your Actions to different users:

  • Language: An agreed upon, spoken and written mode of communication
  • Region: A defined physical area that's usually associated with a country
  • Locale: The combination of a language and region

Now that you understand some basic terms, here's how you can cater your Actions for different languages, regions, and locales with Actions Builder or the Actions SDK.

Languages and locales

Locales are constructed using the language set in the Assistant settings and the region set in the device settings. The combination of these needs to form a supported locale. For example, a device set to the BR region and an Assistant device set to en-US results in a en-BR locale, which is not supported by Actions on Google.

By default, Actions support all regions (countries). Users that have set their Assistant locale to one of these regions, will be able to use your Action.

When a user interacts with your Action, their Assistant locale is also used to determine which text-to-speech (TTS) voice is used for your Action. This default behavior can be overwritten by choosing a specific TTS voice under Develop > Invocation > Settings.

Add languages and locales

To add languages and locales to your Action, follow these steps:

  1. In the Actions console, navigate to > Project settings.
  2. Click the Languages tab and select the languages you want to enable. Use + Add locales to show locales for a root language.
  3. Click Save.
Screenshot of options for adding languages to your Actions project

Editing elements

In Actions Builder, you can change the language of your Action's default invocation, deep links, scenes, intents, and types. To do so, click the language selector with one of these objects selected.

Figure 1. The language selector in the Action Builder UI.

Localization tab

On your Action's Project settings page, the Localization tab allows you to modify settings, prompts, training phrases, and types for all languages your Action supports.

Figure 2. The localization tab of an Action's project settings.
  • Settings: Options like display name and pronunciation for each language.
  • Prompts: All prompts defined in your Action, as well as prompts for system intents.

    If no localized prompts are added to system intents, the default language prompt is used.

  • Training phrases: A list of your Action's intents and the training phrases defined in them.
  • Type synonyms: A list of types and their defined synonyms.

Publishing

The Actions Console lets you customize the following information when publishing your Actions project:

  • Language- and locale-specific information: You can specify different Action information details (such as name and description) at the language and locale level for each of your projects.
  • Location targeting: You can specify the regions where your Action is available. By default, your Action supports all regions, as long as your users have set their Assistant locale to one your Action supports.
  • TTS voice customization: By default, your Action automatically uses a set of TTS voices that corresponds to the user's Assistant locale. You can override this behavior and choose a specific TTS voice that doesn't change based on the user's Assistant locale.

See the Publish localized Actions page for more information on how to localize Action distribution.

Testing

During development, you can test your localized Action with hardware devices or the Actions simulator with the following features:

  • Language simulation lets you set the locale of a device to test out locale-specific responses and logic in your Action.
  • Location simulation lets you set the physical location of the device to test out location targeting and any region-specific responses in fulfillment.

See the Actions simulator page for more information on how to test localized Actions with the Actions simulator.