• 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 *just stop working*
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localizable.strings *just stop working*


  • Subject: Re: Localizable.strings *just stop working*
  • From: "Louis C. Sacha" <email@hidden>
  • Date: Mon, 9 Feb 2004 13:18:29 -0800

Hello...

One, check that there is not a Localizable.strings file loose in the resource folder outside of any of the .lproj folders since then that file would be used instead of the localized files. Also, just in case, if the translated string is supposed to be @"", an empty string, if I remember correctly that doesn't always work and the key might be returned instead.

Second, if you have recently edited the Localizable.strings file, it might have been saved with the wrong encoding... I remember several threads coming up about this with similar subject lines, so if you search the archives you should be able to find more info (some of the threads also included problems with non-ascii characters in localized strings, although searching for NSLocalizedString should pull them all up).

Finally, if the code that is causing the problem is stored in a framework or bundle, you also might want to take a look at the header file for NSBundle, since NSLocalizedString is actually a precomp macro that evalutes into a message using an NSBundle, specifically:

[[NSBundle mainBundle] localizedStringForKey:(key) value:@"" table:nil]

What this means is that if you use the NSLocalizedString macro, you will have problems if you ever put your code in a framework or loadable bundle, since then the localized string lookup will use the wrong bundle (and there are other issues looking up resources in code that pop up when the code is in a framework or bundle, but it would take too long to list them all... I'm hoping to get around to writing an article one of these days about it, to post on one of the cocoa dev sites, or considering the number of issues maybe a series of articles.) If this is your problem, and you have access to the problem code to rewrite it but need help, I can go into more detail...

Hope that helps,

Louis


They are there in the .lproj, in the package,
but this morning, I only get the keys from NSLocalizedString.
.. which is quite frustrating, when it's a url..

has this happened to anyone?

do you have to tell the main bundle that you are using localizable.strings,
and not a string table built-into the nib?

(this is inherited code)
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Localizable.strings *just stop working* (From: Roy Lovejoy <email@hidden>)

  • Prev by Date: Xcode problem
  • Next by Date: Re: Drawing onto NSImageView subclass (Newbie)
  • Previous by thread: Localizable.strings *just stop working*
  • Next by thread: Re: Localizable.strings *just stop working*
  • Index(es):
    • Date
    • Thread