• 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: Determining preferred localizations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Determining preferred localizations
      • From: Gregory Weston <email@hidden>
  • Prev by Date: Re: Simple question
  • Next by Date: Re: App is in Landscape Mode, but main UIWindow still thinks it’s portrait.
  • Previous by thread: Re: Determining preferred localizations
  • Next by thread: Re: Determining preferred localizations
  • Index(es):
    • Date
    • Thread