I\'m developing app for Russian-speaking people. A lot of countries near Russia have the second language - Russian. My app has two localizations: Russian and English. And I need
preferredLanguages sometimes return "ru_RU" but my lproj is ru.lproj. So I decided to another solutions. I added "test.lang.phrase = "YES"; to all my localizable strings files. I load a default localization if localization isn't found.
NSString *result = nil;
NSString *testLang = NSLocalizedString(@"test.lang.phrase", nil);
if ([testLang isEqualToString:@"YES"]) {
result = NSLocalizedString(str, nil);
}
if (!result) {
NSBundle *myLangBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"en" ofType:@"lproj"]];
result = NSLocalizedStringFromTableInBundle(str, nil, myLangBundle,nil);
}