System Language

Alex Rice alex at mindlube.com
Tue Dec 10 11:52:01 EST 2002


On Monday, December 9, 2002, at 02:29  PM, Monte Goulding wrote:
>
> Maybe it's another setting that's changed? Actually I think that for 
> some
> reason the engine thinks my system is en_us even though I have the 
> little
> Australian flag in the menubar.

I think you guys are confusing several different issues.

1) The input method language
	- The app menu with flags in it is for the input method
2) The language selection for applications and dialogs
	- $LANG environment variable
	- NSGlobalDomain
3) The weekday names
	
1) The application menu with flags on it is the "Input Menu". This is 
for setting input methods and keyboard layouts. One can switch input 
methods without switching the system & application language selection 
itself. For example if you had a Spanish keyboard but wanted apps to 
Display their UI in English. As far as I can tell, the Input Menu 
selection has no effect on either language selection itself. See the 
"Input Menu" tab on the International preferences panel.

2) Language selection. `defaults read NSGlobalDomain AppleLanguages` 
will always get you the current list. $LANG will show the 1st language 
in the list, but ONLY after a logout. I am surprised that $LANG is 
synchronized at all. In OS X, a lot of the BSD stuff is not exactly as 
one would expect, because it's just another layer along with Mach, 
Carbon and Cocoa. Anyways, the command `defaults read NSGlobalDomain 
AppleLanguages` will get the current setting, no logout required. See 
the "Language" tab on the International preferences panel.

I tried find out the connection between $LANG and NSGlobalDomain but 
wound up in some pretty hairy "Unicode locale" API documentation. Oh 
well. If anyone is really interested in Unicode, maybe it would be a 
good way to waste a day. :-)

3) The weekday names. Although it's not exposed in the Preferences 
panel this IS a user default, and it's customizable. Don't depend on it 
for finding the language. The Apple developer docs say 
NSWeekDayNameArray is "An array that gives the names for the days of 
the week. Sunday should be the first day of the week." So, one could 
override the names of the days of the week and it would still work. 
However, I don't know if this is the same weekDayNames that RunRev is 
returning with it's system command.

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alrice at ARCplanning.com
alrice at swcp.com




More information about the Use-livecode mailing list