• 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: .r or .strings file not being read in framework
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .r or .strings file not being read in framework


  • Subject: Re: .r or .strings file not being read in framework
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 7 Apr 2007 09:36:12 -0700

On Apr 7, 2007, at 8:50 AM, Mike Linden wrote:

My thinking is there something in the project that’s not correct. For some
reason the external file is not getting linked in?


I'm missing a setting in the project? The project is corrupted? Possible
naming problem? Some init in the Framework that's needed at some point
during run time?


The fact that it is with all of the methods I'm trying to use, makes me
suspect the project rather than the routines themselves.

Like Nick said, you must use either CFCopyLocalizedStringFromTableInBundle, CFCopyLocalizedStringWithDefaultValue, or their Cocoa equivalents in order to access localized strings in a bundle other than the main bundle. This is the case for both framework bundles and plug-in bundles.


A few things to check:

(1) Are the keys you pass to the macro ASCII-only? C and its derivatives are defined to use only the ASCII character set, not Unicode or any extended character sets.

(2) Is your .strings file included in the Copy Bundle Resources build phase of your bundle's target? Just existing as a member of your project isn't sufficient, you need to tell it to actually be part of a target to be used as part of that target.

(3) Are you specifying the name of the strings file -- without the .strings extension -- as the name of the table in your calls to one of the above macros?

(4) Is the .strings file actually localized -- that is, does Xcode show you an "English" or "en" underneath it?

(5) Is the .strings file localized for the exact same locale as is specified in your bundle's CFBundleDevelopmentRegion Info.plist key? (In other words, not localized for "en" when the key is "English" or vice versa.)

I suspect one of the above is what's going on.

  -- Chris

_______________________________________________
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


References: 
 >.r or .strings file not being read in framework (From: Mike Linden <email@hidden>)

  • Prev by Date: Re: Mixing obective-C and c++
  • Next by Date: Porting a Win static lib (.lib) to OS X
  • Previous by thread: .r or .strings file not being read in framework
  • Next by thread: Changing copyright template
  • Index(es):
    • Date
    • Thread