Re: Determining preferred localizations

2010-04-22 Thread Rainer Brockerhoff
At 12:02 -0700 21/04/10, cocoa-dev-requ...@lists.apple.com wrote: From: Gregory Weston gwes...@mac.com Date: Wed, 21 Apr 2010 09:59:48 -0400 Message-ID: a977463a-b8f0-4b24-9284-03012bee3...@mac.com I'm trying to display a localized list of attached displays, and getting unexpected results in

Re: Determining preferred localizations

2010-04-22 Thread Gregory Weston
On Apr 22, 2010, at 7:50 AM, Rainer Brockerhoff wrote: At 12:02 -0700 21/04/10, cocoa-dev-requ...@lists.apple.com wrote: From: Gregory Weston gwes...@mac.com Date: Wed, 21 Apr 2010 09:59:48 -0400 Message-ID: a977463a-b8f0-4b24-9284-03012bee3...@mac.com I'm trying to display a localized

Re: Determining preferred localizations

2010-04-22 Thread Stephane Madrau
Le 22 avr. 2010 à 18:19, cocoa-dev-requ...@lists.apple.com a écrit : Thanks, but no. What I'm passing in is the keys for the dictionary I get as a result of this code: io_connect_t thePort = CGDisplayIOServicePort(theScreenNumber); CFDictionaryRef theInfo =

Re: Determining preferred localizations

2010-04-22 Thread Gregory Weston
On Apr 22, 2010, at 12:45 PM, Stephane Madrau wrote: Le 22 avr. 2010 à 18:19, cocoa-dev-requ...@lists.apple.com a écrit : Thanks, but no. What I'm passing in is the keys for the dictionary I get as a result of this code: io_connect_t thePort = CGDisplayIOServicePort(theScreenNumber);

Determining preferred localizations

2010-04-21 Thread Gregory Weston
I'm trying to display a localized list of attached displays, and getting unexpected results in Carbon and Cocoa when attempting to determine the best localization. I did all the obvious-to-me Google searches without finding much except a couple of other people over the years having similar

Re: Determining preferred localizations

2010-04-21 Thread Gary L. Wade
The list you are getting is a set of preferred localizations, so when trying to get a resource from the first one, if not available, will go on to the next one and so forth. You should utilize the localization-aware methods to handle getting resources rather than trying to manage this yourself.

Re: Determining preferred localizations

2010-04-21 Thread Gregory Weston
Gary L. Wade wrote: The list you are getting is a set of preferred localizations, so when trying to get a resource from the first one, if not available, will go on to the next one and so forth. You should utilize the localization-aware methods to handle getting resources rather than trying to

Re: Determining preferred localizations

2010-04-21 Thread Gary L. Wade
I see what you're getting. The issue is that the keys you're getting back by utilizing kDisplayProductName from IOKit only have paired language/territory (e.g., en_US) while the AppleLanguages array in your setups have non-paired ones for most languages (e.g., en). If you were to turn on paired