[comp.sys.mac.hypercard] doMenu and languages

klaus@diku.dk (Klaus Ole Kristiansen) (07/29/90)

What happens when a DoMenu commmand is given?

One of the buttons in the TidBITS stack has

doMenu "delete card"

in its script. This actually works, even though there is no
"delete card" command in any of the menus of the Danish version
of hypercard. So it seems that the English command works in all
versions. If I were to write a stack, and one of the scripts
included

doMenu "slet kort"

would this work on foreign HC versions?

What about the delete card filter that has been discussed
intensively recently? If the stack script includes a handler

on doMenu what
    if what = "delete card"
    ...
and I activate the "slet kort" command in the rediger menu,
what happens?

Klaus Kristiansen

dan@hayes.fai.alaska.edu (Dan LaSota) (07/30/90)

This message is empty.

dan@hayes.fai.alaska.edu (Dan LaSota) (07/30/90)

Sorry I think that last message got crunched.

To repeat myself:
HyperTalk commands are English.  The menus reflect the local language because
of the string resources within the HyperCard application.
So when you pull down "slet kort" in the Danish version an English
domenu "Delete Card" is generated by HyperCard.

Dan LaSota

stadler@Apple.COM (Andy Stadler) (07/31/90)

In article <1990Jul29.100039.5284@diku.dk> klaus@diku.dk
 (Klaus Ole Kristiansen) writes:
>What happens when a DoMenu commmand is given?
>
>One of the buttons in the TidBITS stack has
>
>doMenu "delete card"
>
>in its script. This actually works, even though there is no
>"delete card" command in any of the menus of the Danish version
>of hypercard. So it seems that the English command works in all
>versions. If I were to write a stack, and one of the scripts
>included
>
>doMenu "slet kort"
>
>would this work on foreign HC versions?

Every version of HyperCard contains two complete copies of the menu strings:
The localized strings (Danish in your case) and the English strings.  When
the doMenu command is issued, the local strings, and then the english strings,
are searched.  This makes the command work in either language.

>
>What about the delete card filter that has been discussed
>intensively recently? If the stack script includes a handler
>
>on doMenu what
>    if what = "delete card"
>    ...
>and I activate the "slet kort" command in the rediger menu,
>what happens?
>

Unfortunately, this is a simple text compare, and doesn't have the benefit of
the two lists or anything like that.  So it may fail in international versions.

--Andy    stadler@apple.com

krona@nada.kth.se (Kjell Krona) (07/31/90)

In the Swedish version of HyperCard, at least, both the Swedish
and English menu resources are included. This means that I can user
either Swedish or Enlish names in the doMenu handler. However, if
another language than English is used, the script will not run on
any HyperCard version. To ensure compatibility, English should be used.

krona@kth.se (kjell krona)