我正在做一个没有任何storyboards
. 所以我不能使用“基础国际化”
我创建了 localizable.string 然后为每种所需语言打开了本地化。
然后尝试做
- UIAlertView * messageBox = [[UIAlertView alloc] initWithTitle:
NSLocalizedString(@"title", nil)
message: NSLocalizedString(@"msg", nil)
delegate: self
cancelButtonTitle: NSLocalizedString(@"ok", nil)
otherButtonTitles: nil];
对于通知,我使用 nsdictionary 并将通知存储为:
- [alertMessages setObject:NSLocalizedString(@"test_notification", nil)
forKey:@"6"];
但是在更改设备的语言时它不会做任何更改。有没有我遗漏的步骤或者是否有更好的方法?任何工作参考将不胜感激!