• 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: CFBundleCopyLocalizedString does not work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFBundleCopyLocalizedString does not work


  • Subject: Re: CFBundleCopyLocalizedString does not work
  • From: "Glenn L. Austin" <email@hidden>
  • Date: Wed, 7 Oct 2009 07:26:37 -0700

On Oct 7, 2009, at 7:19 AM, Dieter Oberkofler wrote:

I'm new to localized string resources and seem unable to properly use CFBundleCopyLocalizedString.
As this seems to be a very common reason for troubles, I have double checked the format of the *.string resource file using plutil and the file itself seems to be ok.
I therefore guess that I'm just not properly locating the *.strings resource file and would need some help on how to trace this.
I load the string resources using something like:
CFBundleCopyLocalizedString(CFBundleGetMainBundle(), CFSTR("TEST"), CFSTR(""), CFSTR("Localizable"));"
I actually don't care about localization (for the moment) so I've put my resource file (Localizable.strings) to a directory Contents/Resources/English.lproj.
Is this correct or do I somehow need to specify where the string resources have been put?
Can I somehow find out where CFBundleCopyLocalizedString  is looking for the string resources?
Can I somehow hard-code where to look for the string resurces?
Any help is appreciated!

What is the problem that you're having?

I'm guessing that you're getting back CFSTR("TEST") instead of CFSTR("") -- if you look at the documentation for that routine, that is the documented behavior. NULL or an empty string returns the key.

-- 
Glenn L. Austin, Computer Wizard and Race Car Driver         <><
<http://www.austin-soft.com>



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CFBundleCopyLocalizedString does not work
      • From: Dieter Oberkofler <email@hidden>
References: 
 >CFBundleCopyLocalizedString does not work (From: Dieter Oberkofler <email@hidden>)

  • Prev by Date: Building a static library for the iPhone
  • Next by Date: Re: CFBundleCopyLocalizedString does not work
  • Previous by thread: CFBundleCopyLocalizedString does not work
  • Next by thread: Re: CFBundleCopyLocalizedString does not work
  • Index(es):
    • Date
    • Thread