Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Exercise: Making a Menu

Table of Contents
true
maxLevel4
minLevel1maxLevel4
include
outlinefalse
indent
excludeExercise: Making a Menu
typelist
printabletrue
classprintable

Translation Configuration

  1. Open the Translation Editor by clicking Open Translation Editor… on the Toolbar or by clicking on Tools > Translation Editor. Create a total of 5 Keys; the index should be from 0-5. Key 0 will be named “Food 1”, and Key 1 will be named “Food 2”,Key 2 will be named “Food 3”, Key 3 will be named “Drink”, and the final Key, Key 4, will be just named “Water”.

Image Added

  1. Click on Edit Languages. Once in the Language Editor, rename “English” to “Breakfast”. After the renaming is done, click on the + two times to add two new languages. Change the second language name to “Lunch” and the third one to “Dinner.” Once renamed, click on OK to save the changes and leave the Language Editor.

Image Added

  1. First, enter Water in the Water row under Breakfast, Lunch, and Dinner. Under Breakfast, enter the following information: for Food 1, add “Sausages”; for Food 2, add “Bacon”; for Food 3, add “Pancakes”; for Drink, add “Coffee”. For Lunch: for Food 1, add “Hamburger”; for Food 2, add “Chicken Tenders”; for Food 3, add “Grilled Cheese”; for Drink, add “Strawberry Lemonade.” Under Dinner, for Food 1, add “Steak”; for Food 2, add “Lamb”; for Food 3, add “Spaghetti”; and Finally, for Drink, add “Iced Tea”.

Image Added

  1. Create eight Text Boxes. For each Text Box, have the following text in a different Text Box. Food 1, Food 2, Food 3, Drink, Water, Breakfast Menu, Lunch Menu, and Dinner Menu.

Image Added

  1. For The Text Box with Food 1, click on the Text Box, go under Basic Properties, and in the Text Field, Click on the Link Icon. Click Expression and change the Expression Type to Multilanguage String. Click OK to save the changes. Do this for Food 2, Food 3, Drink, and Water. For Breakfast Menu, Lunch Menu, and Dinner Menu, click on one of them, go under Actions > On Press > New Command. For each Text box, make a new Command that will Set Translation Language. The Lanuggae should be set to whatever the text says, so lunch will open Lunch, and dinner will open dinner.

Make sure the Initial Value on the Text is the exact same as the Translation Editor Key; otherwise, the Translations will not function

Image Added

Image Added

Image Added

Image Added

Image Added

Image Added

Image Added

Image Added

Translation Runtime

  1. Click Tools >Launch Simulator to launch the Canvas Simulator.

Image Added

  1. Click on “Breakfast Menu.” This will cause all items in the middle column to change to their Translations from the Breakfast column in the Translation Editor.

Image Added

  1. Do this as well for Lunch and Dinner. The text will be translated to their respective Translations that were listed within the Translation Editor.

Image Added

Image Added