Re: Internationalization
Re: Internationalization
- Subject: Re: Internationalization
- From: Douglas Davidson <email@hidden>
- Date: Fri, 24 Aug 2001 15:41:55 -0700
On Friday, August 24, 2001, at 03:26 PM, Dietmar Planitzer wrote:
From: Lars Hoss <email@hidden>
The chapter Documentation > Cocoa > Program Design >
Internationalization gives an example of how to find out the
supported languages.
The constant NSLanguages, however, seems not to be defined anywhere?
Even a "find /System/Libraries -type f -name "*.h" -exec grep
"NSLanguages" {} \; -print"
failed.
Try the string @"AppleLanguages". This change is documented in one of
the
MacOS X release notes (I think BP or GM).
That's correct, the key is now "AppleLanguages". However, you should
almost never need to get the value of this key programmatically--if you
find yourself doing this, chances are you should rethink what you are
doing.
The main reason you need to know about this key at all is to set it when
you want to launch your app in another language, for testing purposes.
You can do this either with the defaults command-line tool, or by
launching your app from the command line with arguments like this:
/Applications/TextEdit.app/Contents/MacOS/TextEdit -AppleLanguages "(fr,
en)"
Douglas Davidson