我在我的 iPad 应用程序中使用 InAppSettingsKit,包括英语、德语和日语的本地化字符串。一切正常,但我希望能够在应用程序内切换语言,这似乎不受 InAppSettingsKit 的支持。这是我的 showSettings 方法:
// show the inapp settings view
-(void) showSettings
{
IASKAppSettingsViewController *settingsViewController = [[IASKAppSettingsViewController alloc] initWithStyle:UITableViewStyleGrouped];
settingsViewController.delegate = self;
settingsViewController.showDoneButton = YES;
UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:settingsViewController];
[self presentModalViewController:navController animated:NO];
}
因此每次都会重新创建设置 VC,但似乎会重新使用初始应用程序启动时的语言选择。
用户的语言选择同时写入我的私人“语言”设置[NSUserDefaults standardUserDefaults]
以及“AppleLanguages”数组中。
旧语言信息在哪里/如何缓存?