Internationalization — Localizing your Action

So, you’ve built an Action that provides a wonderful experience for your users. The only problem is that it’s only available to those who speak the language it was written in. You’re missing out on so many other users that can totally enjoy what you’ve built. So, how can you make your Action reach everyone? By localizing it!

What is localization?

Localization is where you customize the experiences for different languages and locales for your Action. Below are a few examples of a greeting phrase in different languages for a GDG San Francisco Action:

“Welcome to GDG San Francisco. I can tell you about … ”

“Benvenuto a GDG San Francisco. Posso darti informazioni … ”

“Bienvenidos a GDG San Francisco. Puedo contarte sobre … ”

“Willkommen bei der GDG San Francisco. Ich kann dir mehr über unsere … ”

Check out which Languages & Locales Action on Google currently supports.

Reasons to localize

  • Makes your Action available to more users!

How to localize your Action

You can find information on how to localize your Action in the docs, but I’ve organized them below to be a guide for Actions that use Dialogflow and a webhook (check out this sample code on the type of project I’m referring to).

  1. You need to start with a working and robust Action that you’re ready to localize. Ideally this Action has already been deployed, which makes sure that it passes the review process.
  2. Translate all the Action’s text into the different language(s):
  • Action’s responses
  • Training phrases for each intent
  • Custom entities
  • Action’s Directory information
  • Description (short and full) section
  • Sample invocations
  • Privacy policy
  • Terms of service (optional)

This is the most time consuming part, but is the most important. Ideally, you have native speakers to translate the text and they have tested your Action so they can get the feel of the persona of the Action.

3. Update your fulfillment code to support multiple languages. Use a client library that supports i18n (internationalization). There are many different libraries that support this for different frameworks, so choose the one that works for you.

4. Add new language(s) to your Dialogflow agent via the Dialogflow console

  • Add language(s) to your agent — This will copy your intents to each new language
  • Add translated training phrases, responses, and entity entries per new language

5. Add Language(s) to Action on Google console

  • Add Language(s) to Action by going to the Project Setting page via the Gear next to the Overview section. There you clink on Languages, where you can add all the language(s).

6. Test Action in Action console

  • In the Action simulator, test out every conversational flow for each language to make sure that your getting the expected results. The simulator allows you to change the language that is being simulated as well as the location, check out the docs here.
  • Recommend adding tests to your project (Actions on Google Testing Library, sample example)!
  • As you test the different conversational flows in the different language(s), fine tune your SSML so your Actions sound more natural in that language.

7. Update Action on Action on Google console by adding the translated directory information for each language:

  • Description (short and full)
  • Sample invocations
  • Privacy policy
  • Terms of service (optional)

8. Submit for release!

  • It’s recommended to use the beta release because it goes through the same review process as for a production release. Once your project is approved, you can release this to production whenever you are ready.

Before you start check out 5 Tips when Localizing your Action blog. This may seem like a lot of work, but once you translate your Action into one other language, each one after that is super easy! Taking the time to expand your Action into several languages allows more users to use your Action!

Thanks for reading! To share your thoughts or questions, join us on Reddit at r/GoogleAssistantDev.

Follow @ActionsOnGoogle on Twitter for more of our team’s updates, and tweet using #AoGDevs to share what you’re working on. Can’t wait to see what you build!

Previous
Previous

5 Tips when Localizing your Action (adding different languages)

Next
Next

5 Tips from Building an Action with a Conversation Designer