I am loading the plist like so:
NSString * plistPath = [[NSBundle mainBundle] pathForResource:@"Names" ofType:@"plist"];
NSDictionary * contentArray = [[NSDictionary alloc] initWithContentsOfFile:plistPath];
But contentArray is nil if the plist doesn’t exist for the current device’s language. How can I default to English?
NSBundleeffectively uses theCFBundleDevelopmentRegion(aka “Localization native development region”) entry in the application/bundle’sInfo.plistfile to specify the “fallback” language, if you will.For example, let’s assume we have the following bundle layout:
And, the Info.plist specifies a
CFBundleDevelopmentRegionofen.If a French user runs the app, and there is no localized
Numbers.plistfile forfr, thenNSBundleshould return theNumbers.plistfile in theen.lprojdirectory.