Re: Missing system attribute "LANG"
Re: Missing system attribute "LANG"
- Subject: Re: Missing system attribute "LANG"
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 12 Nov 2003 09:44:39 -0800
On 11/12/03 9:13 AM, "Bill" <email@hidden> wrote:
>
In AS 1.8.3, system attribute has an option to find the user's language
>
>
-- AS 1.8.3
>
system attribute
>
-- {"HOME", "SHELL", "USER", "LANG", "PATH", "__CF_USER_TEXT_ENCODING"}
>
system attribute "LANG"
>
-- "en"
or "en_US", "en_UK", etc. so using 'starts with "en"' works best there.
>
>
However, it's missing in AS 1.9.2
>
>
-- AS 1.9.2
>
system attribute
>
{"SECURITYSESSIONID", "HOME", "SHELL", "USER", "PATH",
>
"__CF_USER_TEXT_ENCODING"}
>
>
>
So, how do we find which one is used as the main language (The top most
>
one in Language tab in International Pane of System Preferences)?
I want to know this too. The localization stuff is much more sophisticated
in Panther, and is accessible to Cocoa programming. But how do we figure it
out in AppleScript?
I'm using a _really_ clunky workaround for now:
set datStr to (date string of date "Monday, February 10, 2003 12:00:00 AM")
if datStr does not contain "February"
Use your own date format to compile the first line, of course ("2/10/2003"
in the US, "10.02.2003" in Germany, etc.)
In non-English localizations, the date string will never contain the word
"February". In this case, I only need to know English vs. non-English: it
would be a lot more complicated, but doable, to pinpoint any particular
language this way. I'd like a proper way instead of this workaround.
--
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.