On Nov 2, 2008, at 8:04 PM, Chris Idou wrote:
[[NSBundle bundleForClass:[self class]] localizedStringForKey:@"kMDItemFSLabel" value:@"nothing here" table:@"MetaData"]

MetaData.strings ends up in my English.lproj and get info says it is an English localization. But the code returns "nothing here".

I've also tried:

NSLocalizedStringFromTable(@"kMDItemFSLabel", @"MetaData", @"kMDItemFSLabel")

But that doesn't work either. Am I missing something?


When I can't get a specific localized string (or any string in a strings file) to be picked up correctly it's always a syntax error in the strings file. You'll get no warning of any kind in such a case, it just doesn't work.

I usually have things like this:

"Some Text" = "Some Translated Text"; text here that ought to be a comment but isn't

A line without terminating semicolon will mess things up too.

If that doesn't help you could try if it's caused by the file name somehow by renaming it to "Localizable.strings" and exchanging the call to

  NSLocalizedString(@"kMDItemFSLabel", @"My Comment");

Hope this helps.

Regards
Markus
--
__________________________________________
Markus Spoettl

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

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to