Re: Determining preferred localizations
Re: Determining preferred localizations
- Subject: Re: Determining preferred localizations
- From: Stephane Madrau <email@hidden>
- Date: Thu, 22 Apr 2010 18:45:42 +0200
Le 22 avr. 2010 à 18:19, email@hidden 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 = (CFDictionaryRef)IODisplayCreateInfoDictionary(thePort, 0);
> CFDictionaryRef theNames = CFDictionaryGetValue(theInfo, CFSTR(kDisplayProductName));
>
> theNames will look something like this:
>
> "en_US" -> "Color LCD"
> "en_GB" -> "Colour LCD"
> "fr_FR" -> "LCD couleur"
> ....
Did you check what Apple themselves do within IODisplayLib.c (IOKitUser / graphics.subproj) ?
http://www.opensource.apple.com/source/IOKitUser/IOKitUser-514.8.1/graphics.subproj/IODisplayLib.c
Check the function named "GenerateProductName"...
Of course, it's all plain CoreFoundation, but for me it works
(or I didn't see the problem you are seeing and I missed your point)
--
Stephane
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden