• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript international language
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript international language


  • Subject: Re: Applescript international language
  • From: Steve Thompson <email@hidden>
  • Date: Wed, 20 Oct 2010 11:47:46 +0100


On 20 Oct 2010, at 11:18, Shane Stanley wrote:

On 20/10/10 8:14 PM, "Shaguo" <email@hidden> wrote:

Hi all,

How use apple script for international application? For example, display a
dialog and show the message with the local language. Is there any way like
other language?

--
Thanks & Best Regards!

Email:email@hidden <mailto:Email:email@hidden>
Yahoo:email@hidden <mailto:Yahoo:email@hidden>
Blog: http://rashaguo.appspot.com/

勤奋,不断追求卓越...

Copying and pasting from your email:

display dialog "勤奋,不断追求卓越..."

(I'm sorry, I don't actually know what that means...)

The actual AppleScript stuff has to be in English, though.

-- 

You can do it but it's a bit fiddly. You need to create localisation strings and save them with your script as a bundle.

Save your script as a bundle and then in the Finder, right-click and choose "Show package contents"

Create a new folder called English.lproj (or Chinese.lproj or German.lproj and so on) 

In that folder create a file called Localizable.strings

In the file enter text in this format:

"Hard work" = "勤奋";
"Yes" = "是的";
"Yes" = "Ja";
"No" = "Nein";

Obviously don't mix German and Chinese - use the relevant Localizable.strings file.

Now, as Shane said - the AppleScript needs to be written in English but AppleScript comes with the necessary commands to do the localizations:

display dialog (localized string "Hard work") buttons {localized string "Yes", localized string "No"} default button 1 with icon caution
if button returned of result is (localized string "NO") then error number -128

Steve
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: Applescript international language (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Changing "open with" (Mac Finder) for certain files
  • Next by Date: Re: Applescript international language
  • Previous by thread: Re: Applescript international language
  • Next by thread: Re: Applescript international language
  • Index(es):
    • Date
    • Thread