Language Use Cases for Skills

The approach you take to handling your language requirements for skills depends on a number of factors. Here are some typical use cases and ways you can approach them.

Ability to Train in Multiple Languages

For skills that you target to the languages that Oracle Digital Assistant supports natively, you can add training data for all of the target languages. This includes example utterances for intents and custom entity values.

Prerequisites:

  • The languages you are targeting all are on the list of Natively-Supported Languages.
  • The Platform Version of the skill is 20.12 or higher.

General steps:

  • When creating the version (or clone) of the skill, designate one of the natively-supported languages as the primary language. This language will serve as the default language in the skill. Once you have set it, you can not change it.
  • On the skill's Settings, Intents, or Entities page, add any additional natively-supported languages that you want to target.
  • Build the training corpus in the primary language.
  • For each additional language, augment the training corpus as necessary.
  • For any value list entities that you create in the primary language, add values in the additional language that correspond to each of the values in the primary language.
  • Create resource bundles for each of the skill's output strings, provide entries for each language, and reference the resource bundle keys from the appropriate places in the dialog flow and the skill's settings.

Other notes and considerations:

  • In terms of user experience, this approach gives you the best opportunity to satisfy user expectations in multiple languages.
  • To realize the potential of this approach, be sure to allocate adequate resources for multi-language intent training and formulating effective output messages in all of the target languages.

Avoid Using a 3rd-Party Translation Service

If you want to create a skill with one or more non-English languages but don't want to use a 3rd-party translation service, you can use Digital Assistant's native language support. See the above Ability to Train in Multiple Languages topic.

Create a Skill in a Language Not Supported Natively

Typically, if the language you are targeting for a skill is supported natively in Oracle Digital Assistant, you would use that native language support for the skill. However, if that language is not supported natively, you can use a translation service.

Prerequisite:

  • You have configured a translation service (such as OCI Language, Microsoft Translator, or the Google Translation API).

General steps:

  • When creating the skill, designate the target language as the primary language (and in translation mode).
  • Create intent utterances and entity values in the language that you are supporting.
  • Add code to the dialog flow to detect the language of the user input and to translate it behind the scenes. (For non-English skills that rely on a translation service, the underlying training model of the skill is in English.)
  • Create resource bundles for the skill responses.

Other notes and considerations:

  • If the target language of your skill is among the natively-supported languages, consider using the native language approach. Then, if you later need to add other languages that are natively supported, you will be able to optimize intent resolution for each language (in addition to having more control over the output messages).
  • If you later want to add other languages to the skill and one or more of the desired languages isn't supported natively, you would need to create a new skill from scratch and set English as the primary language in the new skill.
  • Entity values for built-in entity types (such as NUMBER, EMAIL, and DATE) are extracted after the user input has been translated to English behind the scenes.

Create a Multi-Language Skill that Targets Languages That Are Not Supported Natively

If you are designing a skill that targets multiple languages and one or more those languages are not supported natively, you can use a translation service for the skill.

Note

It's currently not possible to have a skill that mixes native language support and a translation service. If any of the languages are not supported natively, you have to use the translation service for all of the languages.

Prerequisite:

  • You have configured a translation service (either Microsoft Translator or the Google Translation API).

General steps:

  • When creating the skill, designate English as the primary language (and in translation mode).
  • Create intent utterances and entity values in English.
  • Add code to the dialog flow to detect the language of the user input and to translate it behind the scenes.
  • To handle skill responses, either:
    • Set up the dialog flow to translate skill responses from English to the user's language.
    • Create resource bundles with entries for each target language and configure the skill to use them in its responses.

Other notes and considerations:

  • Entity values for built-in entity types (such as NUMBER, EMAIL, and DATE) are extracted after the user input has been translated to English behind the scenes.

Create a Multi-Language Skill Without Resource Bundles for Each Language

If you'd like to create a multi-language skill but do not want to create resource bundle entries for the various languages, you can use the translation service to handle the skill's responses. (This approach does not work with Digital Assistant's native language support.)

Prerequisite:

  • You have configured a translation service (either Microsoft Translator or the Google Translation API).

General steps:

  • When creating the skill, designate English as the primary language (and in translation mode).
  • Add code to the dialog flow to detect the language of the user input and to translate it behind the scenes.
  • Set up the dialog flow to translate skill responses to the user's language.

Other notes and considerations:

  • If all of the target languages of your skill are all among the natively-supported languages, consider using the native language approach instead, since this will enable you to optimize intent resolution for each language (in addition to having more control over the output messages).
  • Even if you need to target languages that are not natively supported, you may find that the benefits of having greater control of the output messages justifies the costs.