English.lproj/Localizable.strings を辞書として読み取り、そのキーをフェッチすることで、すべての文字列キーを取得できます。
NSString *stringsPath = [[NSBundle mainBundle] pathForResource:@"Localizable" ofType:@"strings"];
NSDictionary *dictionary = [NSDictionary dictionaryWithContentsOfFile:stringsPath];
各言語の翻訳を取得するには、各英語キーの言語を反復処理して、次を使用できますNSLocalizedStringFromTableInBundle
。
for (NSString *language in [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"]) {
NSBundle *bundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:language ofType:@"lproj"]];
NSLog(@"%@: %@", language, NSLocalizedStringFromTableInBundle(@"Testing", @"Localizable", bundle, nil));
}