【发布时间】:2023-04-08 09:07:01
【问题描述】:
我在我的 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”数组。
旧语言信息在哪里/如何缓存?
【问题讨论】:
标签: ios cocoa-touch localization settings.bundle inappsettingskit