On Tue, Jun 24, 2008 at 5:56 AM, Christopher Nebel <
email@hidden> wrote:
AppleScript 2.0 added support for literal Unicode strings in the source code, but that's not necessary for your problem. What you want is the "localized string" command. Using it is a little complicated, but not too bad:
1. Save your script as a bundle (ideally an application bundle, but a script bundle should work as well).
2. For any text you want to localize, replace the literal string with a function call, like this:
localized string "My Body"
3. In the script bundle resources, make a new lproj folder named for the locale you want -- for example, "zh_CN.lproj" for Chinese. Inside that, add a text file named "Localizable.strings", which contains lines like this:
"My Body" = "Chinese My Body";
Save them as UTF-16; TextEdit should do that for you if necessary. Repeat as necessary for all the strings and all the locales you want. When you run the script, the "localized string" calls will return the localized string that you provided. (If someone tries to use a locale you didn't provide text for, it will return the original string, so it's wise to make them at least somewhat readable.)
--Chris Nebel
AppleScript Engineering
On Jun 23, 2008, at 5:21 AM, parag vibhute wrote:
Any answer guys???
I know Applescript 2.0 (which run on Leopard) supports unicode character set & so support chinese language localization. But what about panther & tiger? It(script with chinese string) does not give expected output on Panther & tiger. So what should be the solution?
Thanks,
Palav
On Mon, Jun 16, 2008 at 6:37 PM, parag vibhute <
email@hidden> wrote:
I have following script for generating an email in Apple Mail application:
tell application "Mail"
set theMessage to make new outgoing message with properties {visible:true, subject:"My Subject", content:"My Body"}
tell theMessage
make new to recipient at end of to recipients with properties {address:"
email@hidden"}
end tell
end tell
Now I want to make content of email("My Body" in above script) in Chinese language instead of English, how can I do it? I tried in script editor but whenever I compile the script chinese characters gets changed to some garbage character. What should I do?