How to call Localization.string file content
How can I get the key value from the Localizati开发者_JAVA百科on.string file on iPhone?
You can use NSLocalizedString(@"Your_Localized_String_Name",@"");
You need to name your strings file "Localizable.strings" exactly if you want to use the easy default behaviour described there. Otherwise, you need to provide the name of the strings file.
In your case, the code would be more like:
NSBundle *thisBundle = [NSBundle bundleForClass:[self class]];
NSString *locString = [thisBundle
localizedStringForKey:assortedKeys[keyIndex++]
value:@"No translation" table:@"Localization"];
If, and only if you rename Localization.string to Localization.strings
精彩评论