Ich habe 2 Sätze von lokalisierten Bildern für eine iPhone App. Wie sollte ich die Bilder platzieren? Und wie kann ich sie in die App laden?
Die Ordnerstruktur ist wie folgt:
For English version:
/MyApp/en.lproj/Localizable.strings , InfoPList.strings
/MyApp/en.lproj/*.png (images)
For Traditional Chinese version:
/MyApp/zh-Hant.lproj/Localizable.strings , InfoPList.strings
/MyApp/Resources/*.png (images)
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *locale = [[defaults objectForKey:@"AppleLanguages"] objectAtIndex:0];
NSString* path= [[NSBundle mainBundle] pathForResource:locale ofType:@"lproj"];
NSBundle* languageBundle = [NSBundle bundleWithPath:path];
SomeViewController *vc = [[SomeViewController alloc] initWithNibName:@"SomeViewController" bundle:languageBundle];
Ich möchte denselben Dateinamen für beide Bildergruppen verwenden und sie automatisch laden lassen. Ist das möglich?
Jetzt habe ich ein Problem. In der Debug-Konsole, sagte es:
NSBundle </Users/SomeUser/Library/Application Support/iPhone Simulator/5.0/Applications/1DC22505-1E78-4B5E-A794-DBF72DC786AE/MyApp.app/zh-Hant.lproj> (not yet loaded)
Wie kann ich das Problem lösen?