Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding the users highest ranked language, regardless of what an app supports



This technique doesn't work if the language isn't one the Script Manager understands, of which there are already some and will be many more over time.

Apple doesn't officially support this right now. If you could mention why you want to know this (the user's most-preferred language), someone might be able to suggest a supported alternative.

Deborah Goldsmith
Manager, Fonts / Unicode Liaison
Apple Computer, Inc.
email@hidden

On Friday, May 30, 2003, at 07:47 PM, John Stiles wrote:

If you set the following key in your plist:

<key>CFBundleDevelopmentRegion</key>
<string>Global</string>

Then you can call GetScriptManagerVariable( smRegionCode ) and get back values like verUS, verJapan, verFrance, etc.

This is actually a bit sneaky--I believe what is ACTUALLY occurring here is that we are setting the CFBundleDevelopmentRegion key to an unknown region, and so it falls back on the user-selected localization. However, to the best of my knowledge, that's the only way to do it (at least for our app, which is constrained to Carbon CFM for OS 8.1 compatibility). Unfortunately, I don't think you get the same behavior if you omit the CFBundleDevelopmentRegion key altogether. I don't remember exactly what GetScriptManagerVariable( smRegionCode ) returns in that case, though... I think it was always English, or something along those lines. (You may notice small side-effects when using this technique as well... for example, in Japanese mode, the ellipses at the end of menu items might turn to halfwidth katakana if you use high-ASCII ellipses instead of three periods and are not using CFStrings, just like if you ran the app in the Japanese version of OS 9.)

Actually, I'd be interested to hear Apple's take on this technique. I know we're not the only ones doing it, but is it kosher? It isn't going to break out of nowhere in a future 10.x release or anything, right?


On Friday, May 30, 2003, at 03:41 PM, Jim O'Connor wrote:

I need to be able to find out what is at the top of the list the user sets
in the International panel of the system preferences, regardless what the
app supports. Any pointers?


Thanks.
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Finding the users highest ranked language, regardless of what an app supports (From: John Stiles <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.