如何更改 UIActionSheet 按钮的默认语言?
在 iOS5 应用程序中,我有一个 UITextView,其中包含电话号码等数据检测器。当我点击带下划线的链接/检测到的数据时,一切都会按预期工作,但是当我点击该链接稍长一些时,会出现 UIActionSheet(呼叫 xyz、添加到联系人等)。这也很好,除了这些按钮的语言是英语,但应该是德语。我已经在 xcode 中将应用程序的默认语言设置为德语,并删除了英语本地化,但按钮标题保持不变。是否可以以某种方式改变语言?
In an iOS5 app, I have a UITextView with data detectors for phone numbers and so on. When I tap the underlined link / detected data, everything works as expected, but when I tap that link a little longer, an UIActionSheet appears (Call xyz, Add to Contacts and so on). This is fine as well except the language of those buttons English but it should be German. I already set the default language of the app to German in xcode and also deleted the English localization but the button titles remain as they are. Is it possible to change the language somehow?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我自己找到了答案。最初,我认为我需要进行英语本地化,因为当我删除(只有一个)本地化时,故事板文件也被删除了。现在的解决方案非常简单。我添加了德语本地化(故事板是复制的),然后删除了英语本地化。这样,操作表按钮现在是德语,故事板文件保留在项目中 - 问题解决了。
抱歉之前太蠢了,没有尝试过:-/
Found the answer myself. Originally, I thought I need to have the English localization because when I deleted the (only one) localization, the storyboard file was deleted as well. The solution now was very simple. I added the German localization (the storyboard is copied) and then deleted the English one. This way the action sheet buttons are German now and the storyboard file remains in the project - problem solved.
Sorry for being too stupid to try this before :-/