could someone give me an idea how to find the problem. I have an app named "MyApp". I would like to localize the app name to German. I have a directory de.lproj in the main project directory. It contains a file Localizable.strings and that works fine. I added a InfoPlist.strings file and in there I put:
CFBundleDisplayName = "Applikationsname";
But it wouldn't show the translated name, it stays on "MyApp". Here is what I tried so far:
- Triple checked spelling and capitalization
- clean all
- delete app from device and in simulator
- delete user dir in simulator
- changed the english app name in MyApp-Info.plist - that works.
- reread whatever I could find in Apples documentation and lots of googling, confirming that it should work.
Whatever I tried, the app name is the one from MyApp-Info.plist. I also log this in the app delegate:
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSArray *languages = [defaults objectForKey:@"AppleLanguages"];
NSString *currentLanguage = [languages objectAtIndex:0];
NSBundle *bundle = [NSBundle mainBundle];
NSDictionary *info = [bundle infoDictionary];
NSString *prodName = [info objectForKey:@"CFBundleDisplayName"];
NSLog(@"Product Name:%@",prodName);
NSLog(@"Current Locale: %@", [[NSLocale currentLocale] localeIdentifier]);
NSLog(@"Current language: %@", currentLanguage);
Output is:
2010-12-08 12:51:00.886 MyApp[25148:207] Product Name:MyApp
2010-12-08 12:51:00.946 MyApp[25148:207] Current Locale: de_DE
2010-12-08 12:51:00.946 MyApp[25148:207] Current language: de
So the language setting is correct, but the app won't read the InfoPlist.strings file? Any ideas how to continue from here?
Thanks in advance for any reply.