Re: Getting the default language with AppleScript
Re: Getting the default language with AppleScript
- Subject: Re: Getting the default language with AppleScript
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 06 Jul 2004 16:59:46 -0700
On 7/6/04 4:15 PM, "John Baltutis" <email@hidden> wrote:
>
That won't really do it, IIRC, that just gives you the locale, but not the
>
localization. Try:
>
>
$ defaults read -g | grep AppleLanguages
>
>
->AppleLanguages = (en);
>
>
which is what you set in the International PrefPane->Language.
Nope. I get
--> " AppleLanguages = (en, fr, ja, de, es, it, nl, sv, nb, da, fi, pt,
\"zh-Hans\", \"zh-Hant\", ko); "
since I have quite a few languages listed in the Languages section of my
International Prefs (NOT "Input", which is different), as you can see. That
would be because I install the extra languages with OS 10.3, I guess.
This is best, as Martin said:
do shell script " defaults read -g AppleLocale"
--> "en_US"
If I don't care about which variety of English, I can always get text 1 thru
3 and check for "en_". (Some obscure languages have 3-character codes, and
then there are the special "zh-" types.) The characters before the "_" in
the locale specify the language, and the bit after the region.
--
Paul Berkowitz
_______________________________________________
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.