[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localization in Cocoa/GNUstep

From: Adam Fedor
Subject: Re: Localization in Cocoa/GNUstep
Date: Thu, 25 Sep 2003 08:31:03 -0600

On Thursday, September 25, 2003, at 05:36 AM, Andreas Hoeschler wrote:


after experimenting a while with localization under MacOSX and GNUstep it is obvious to me that the current implementation on both platforms is not reliable and predictable enough for our purposes. We will therefore invent our own scheme. However, I would like to know how to programmtically determine the preferred language set for a given user (System Preferences on MacOSX, defaults write NSGlobalDomain ... on GNUstep).

On MacOSX [[NSProcessInfo processInfo] environment] returns a dic containing a key LANG ("de_DE", "en_US",...). On GNUstep it does not. Any hints?

In GNUstep you can use

[NSUserDefaults userLanguages]

to get an array of user languages (German, English, etc). The first being the default language. You can also use

GSSetLocale(LC_ALL, nil);

to get the language string (de_DE, en_US). This last one isn't documented, but it should be.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]