• 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
How to ^set^ preferred localizations?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to ^set^ preferred localizations?


  • Subject: How to ^set^ preferred localizations?
  • From: Jerry Krinock <email@hidden>
  • Date: Fri, 28 Mar 2008 11:06:49 -0700

Even though I have included six .lproj/Localizable.strings directories in my framework's Resources, -localizedStringForKey:value:table: always ignores my System Preferences or MiniGlot setting and returns results from the English. From reading the remarks of Douglas Davidson,

http://www.cocoabuilder.com/archive/message/cocoa/2005/8/15/144364

I understand the problem is that Cocoa is getting its candidate localizations from my main bundle which has only English. Douglas proposes two solutions. I like the second solution better, but I don't get it.

This solution is to "use NSBundle methods to load resources in an arbitrary localization, and there is a mechanism (preferredLocalizationsFromArray:forPreferences:) to allow you to select the user's most preferred localization for any given bundle."

Huh? If I give this method an array of candidate localizations, it ^returns^ it back, pruned and reordered, showing its preferred localizations. (In my case, I get an array of one object, "English"). You see, this method is a getter. I need either a method to ^set^ these preferred localizations, or else a version of localizedStringForKey:value:table: that has a localization: argument. What am I missing?

Jerry
_______________________________________________

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: How to ^set^ preferred localizations?
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: iPhone Interface builder
  • Next by Date: Re: cocoa http client library
  • Previous by thread: Re: iPhone Interface builder
  • Next by thread: Re: How to ^set^ preferred localizations?
  • Index(es):
    • Date
    • Thread