Re: Compiled AppleScripts for 'other' languages
Re: Compiled AppleScripts for 'other' languages
- Subject: Re: Compiled AppleScripts for 'other' languages
- From: Christopher Nebel <email@hidden>
- Date: Sun, 22 Jun 2003 20:29:14 -0700
On Friday, June 20, 2003, at 9:07 PM, Dale Gillard wrote:
Does an AppleScript written in English have to be rewritten (ie
localised) to work on say a French user's Mac?
As scripts can be saved in a compiled format I am wondering whether
this avoids the need to rewrite the script in French. That is, the
script is compiled - converted from English text to Apple Events - and
so there is no need to rewrite the script text in French.
For the script code, you're correct, though for the wrong reason.
AppleScript is AppleScript, no matter where it goes in the world, just
like Perl is Perl, or whatever. The fact that AppleScript resembles
English is really sort of incidental. (Of course, you do have to make
allowances for the environment -- things like the date format vary from
country to country, and if you're using GUI scripting, all the control
titles will be different.)
As for messages that you put in your script, those are constant strings
and will stay exactly as you wrote, so your "display dialog" messages
(or whatever) will still be in English. Plain AppleScript does not
have any effective way to deal with this, but AppleScript Studio does
-- see "localized string".
--Chris Nebel
Apple Development Tools
P.S.: A couple of people have mentioned the old "dialect" feature,
which exploited the compiled form of AppleScript to allow the creation
of other "dialects" -- French and Japanese were the ones that shipped
-- which could substitute terms and even syntax to allow for things
like the verb coming at the end of Japanese sentences.
Unfortunately, it didn't work *that* well, so you tended to get sort of
weird French and Japanese, and third parties never bothered to
translate their application dictionaries, so most of your script wound
up in English anyway. Support for non-English dialects was dropped
around version 1.4, as I recall.
A funny story about dialects: the typical demo for them was to show a
script in the English dialect, and then switch the dialect to French --
the whole script would magically turn into French. The first time they
tried showing this to a bunch of reporters, they all thought
AppleScript was some new automatic translation technology -- it took
the better part of an hour to straighten them out.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.