You can localize your apps for the Google Assistant to provide customized experiences for different languages and locales that users can set on their devices. In addition, you can restrict access to your apps 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 apps 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 apps for different languages, regions, and locales in the Actions Console, Dialogflow, or fulfillment.
Supported languages and locales
See the languages and locales document for information on which locales your app can support and the corresponding TTS voices for these locales. Users must set their Assistant locale setting to a supported locale to use your app.
The Actions Console lets you customize the following information when publishing your apps:
- Language- and locale-specific app information: You can specify different app information details (such as name and description) at the language and locale level for each of your projects.
- Location targeting: You can specify regions that your app is available in the Actions Console. By default, your app supports all regions, as long as your users have set their Assistant locale to one your app supports.
- TTS voice customization: By default, your app 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 Publishing document for more information on how to localize app distribution.
Dialogflow lets you create agents that support multiple languages and locales. For every language or locale, you can specify customizations such as different User says phrases and Responses.
See the Dialogflow agents document for more information on how to create localized agents.
When building your fulfillment, you can provide:
- Language- and locale-specific responses: You receive the user's Assistant
locale setting in each request to your fulfillment. You can use this string (for
en-GB) to figure out how to return different responses based on a user's language or locale.
- Region-specific responses - You can request permission to access the physical location of the device from the user. With this information you can further customize responses for regions.
See the fulfillment document for more information on how to localize responses.
During development, you can test your localized app 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 app.
- 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 testing document for more information on how to test localized apps with the Actions simulator.