Oracle Magazine, July/August 2018
Mobile APPLICATION DEVELOPER language supported by the bot to control the wording tone and voice of the bot response For example in German users can be addressed as Sie or du Du is less formal and may be used by bots that are more casual such as the pizza bot in this example For formal business bots you would use Sie Resource bundles can help ensure that the right form of address is used In the following hands on instructions you are going to change the printOrder state message from Your order 15687 of a pizzaType value pizza size pizzaSize value is complete to use a resource bundle instead The German response returned by the resource bundle will use du instead of Sie to ensure a more casual tone for the pizza bot 60 Select the Resource Bundles menu item from the left menu to open the ORACLE MAGAZINE JULY AUGUST 2018 61 resource bundles designer page 61 Click the green Bundle button 62 The first entry is a key and a message string for the default language English 63 Enter printOrderMsg as a value of the Key field The value must be unique and is used in all translation bundles 64 In the Text field enter Your order 15687 of a 0 pizza size 1 is complete Note The 0 and 1 characters are placeholders that enable you to pass values into the sentence 65 Click the Create Entry button Note You just created a first message bundle string In a real bot project
You must have JavaScript enabled to view digital editions.