Think of something that you wish Authorware could do but it doesn't?  Let the our good friends at Macromedia know via the wishlist.

Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed.

Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list.

Back

B7012 - How can I set up different languages [using lists and property lists]?

by - Joseph Ganci


The first thing you need to do is to get which language you will be using. After you have that you can set the name of the language to a variable, Language might be good name for this variable.

Then attach a calc icon to each display icon that contains:

EnglishText := "Hello." --> my english text
FrenchText := "Arevoir." --> my french text
GermanText := "Gutentag." --> my german text

Inside the display icon embed the statement:

{ Test(Language="English", EnglishText, Test(Language="French", FrenchText, Test(Language="German", GermanText))) }

This statement will test for the specific Language and display the corresponding text.

I might suggest the use of property lists here. Instead of using separate variables below, you can use one:

text := [#english:"Good morning" , #french:"Bonjour" , #italian:"Buon giorno"]

Set the language to the proper language:

language := #english

Then just show on the screen:

text[language]

You can also use linear lists, but you'll have to keep track of the language yourself:

text := ["Good morning", "Bonjour", "Buon giorno"]
language := 1

Put the same thing on the screen:

text[language]

In this case, you would have to know that languge 1 is English.

There are 0 reviews
Add your review
Back