article by Barry Hiern, August 2021

 

When developing custom components to be used within a Multi-Lingual skill, there traditionally have been limited options to ensure that the responses from the component match the language in which the overall conversation has taken place.    


While the skill itself could take advantage of language optimized Resource Bundles within the BotML, the custom component did not have direct access to these bundles and hence the only options available to a developer were:

 

  • Pass the required data back to a predefined context variable (within the BotML), and subsequently reference that from user interface components in the dialog flow.  
  • Create a separate Message Bundle structure within the custom component itself, to allow for direct responses in a number of predefined (and hard coded languages).  
  • Pass translated strings from the resource bundle to the custom component at runtime

Starting with Oracle Digital Assistant 21.06, the use of resource bundle strings in custom component messages has been greatly simplified through the introduction of the context.translate() method to the conversation context within the Bot SDK.

This article explains how you can leverage this new feature in your custom components and your entity event handler.
 

Read More (PDF)

Sample Skill

Import the sample skill to your Oracle Digital Assistant instance and run it in the embedded conversation tester using a "hi" message

Download Skill (ZIP)

Related Content

TechExchange: Options for Working With Message Bundles in Oracle Intelligent Bots

TechExchange: A Simple Guide and Solution to Using Resource Bundles in Custom Components

TechExchange: All 2-Minutes Oracle Digital Assistant Tech Tip Videos on YouTube

TechExchange Quick-Tip: How-to Use Resource Bundles Defined In A Skill Within Custom Components Without Tying The Component To A Specific Skill

Author