Re: Localization...
Re: Localization...
- Subject: Re: Localization...
- From: Markus Spoettl <email@hidden>
- Date: Sun, 2 Nov 2008 20:15:55 -0800
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 (email@hidden)
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:
This email sent to email@hidden