• 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: Localizable.strings not happening
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localizable.strings not happening


  • Subject: Re: Localizable.strings not happening
  • From: Markus Spoettl <email@hidden>
  • Date: Fri, 19 Dec 2008 11:14:41 -0800


On Dec 19, 2008, at 12:54 AM, Lance Drake wrote:
The actual call looks like this:

NSString* result = [[NSBundle mainBundle] localizedStringForKey:key value:@"" table:nil];

I have tried the various MACRO flavors of the call but everything remains the same.

It seems that the Localizable.strings file is not somehow being recognized by the app.

Many, many, experiments later, it is always the 'key' string which is returned.

Any ideas? Thanks!


Not sure what the problem is. I'm using

  NSLocalizedString(NSString *key, NSString *comment)

to get localized versions for key. There are a couple of things that could go wrong:

1) key contains non-ASCII characters, only the lower 127 ASCII characters are allowed

2) The Localizable.strings file is corrupt. You will get no warning if that happens, it just won't work. One way of checking whether is is in fact OK is to open it with "Property List Editor.app" (comes with Xcode). A proper .strings file will open correctly, if it doesn't work your file contains errors.

Regards
Markus
--
__________________________________________
Markus Spoettl

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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: 
 >Localizable.strings not happening (From: Lance Drake <email@hidden>)

  • Prev by Date: Re: How to disable auto-opening files in the main Xcode window?
  • Next by Date: Re: NSBox over NSImage wipes NSImage on MacOS 10.4
  • Previous by thread: Localizable.strings not happening
  • Next by thread: Re: Package C++ lib for use from ObjC (Benson Margulies)
  • Index(es):
    • Date
    • Thread