From: Hans-Christoph S. <ha...@at...> - 2009-09-12 02:19:34
|
On Sep 11, 2009, at 10:55 AM, Daniel A. Steffen wrote: > On Fri, Sep 11, 2009 at 07:36, Daniel A. Steffen > <da...@us...> wrote: >> To get the user's preferred user interface languages, you should >> indeed use the NSGlobalDomain AppleLocale preference > > ack, of course meant to say "use the NSGlobalDomain AppleLanguages > preference", sorry "NSGlobalDomain AppleCollationOrder" does seem to provide the current language that is on top of the AppleLanguages list, but the problem there is that they aren't always proper locale formats (pt-PT, zh- Hans, zh-Hant, etc.) Here's my test: - my laptop was installed in English (en_US) - I set my user account to have "Deutsch" as the preferred language - I am logged with "Deutsch" as the top language - native apps are in German - I launch my app with an embedded Wish 8.5.6 - its in English - "puts $tcl::mac::locale" shows me "en_US" - "NSGlobalDomain AppleLocale" is en_US - "NSGlobalDomain AppleCollationOrder" is de - "com.apple.dock loc" is de_DE .hc ---------------------------------------------------------------------------- "Free software means you control what your computer does. Non-free software means someone else controls that, and to some extent controls you." - Richard M. Stallman |