如以下屏幕截图所示:
尽管设备语言已设置为阿拉伯语(您可以通过检查状态栏和事件 View Controller 标题来识别它)。但是,取消按钮仍然有“取消”的标题;由于我们无法更改其标题,我认为它应该根据设备语言自动更改 - 在我的情况下是阿拉伯语 - (需要本地化),如本文 answer 中所述.
我在这里想念什么?
最佳答案
我找到了一个适合我的解决方案,我的设备语言设置为阿拉伯语。
转到您的 Info.plist
并添加 Localized resources can be mixed
带 bool 值 YES
给它。
如 Core Foundation Keys 中所述:
CFBundleAllowMixedLocalizations
CFBundleAllowMixedLocalizations (Boolean - iOS, macOS) specifies whether the bundle supports the retrieval of localized strings from frameworks. This key is used primarily by Foundation tools that link to other system frameworks and want to retrieve localized resources from those frameworks.
关于ios - 为什么 UIActivityViewController 不显示本地化的取消字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47323285/