• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Internationalization
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: Internationalization (From: Dietmar Planitzer <email@hidden>)

  • Prev by Date: Re: Docs, questions and stuff
  • Next by Date: Re: Docs, questions and stuff
  • Previous by thread: Re: Internationalization
  • Next by thread: Getting the image of a window?
  • Index(es):
    • Date
    • Thread