UIWebView 中的 iPhone 键盘,如何更改下一个/上一个和完成按钮的语言
UIWebView 的键盘非常酷,带有下一个/上一个和完成按钮。但是,我无法找到并更改按钮标题。无论系统以哪种语言运行,标题始终为英文。
UIWebView's keyboard is pretty cool with its next/previous and done buttons. However, I was not able to find and change the button titles. The titles are always in english no matter in which language the system is running.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我一直在为基于 PhoneGap 的应用程序寻找这个问题的答案,最后我在这里找到了答案: UIWebview本地化。
线索是在 info.plist 中将“CFBundleAllowMixedLocalizations”设置为“Yes”。这真的让我很开心:)
I have been looking for the answer to this for a while for my PhoneGap based application, and at last I found the answer here: UIWebview Localization.
The clue is to set 'CFBundleAllowMixedLocalizations' to 'Yes' in your info.plist. That really made my day :)
除非您有自己设计的键盘来覆盖普通键盘,否则您不能这样做。
库存键盘的语言取自 iOS 语言设置(通过“首选项”>“常规”>“国际”)。
Unless you have your own keyboard designed by you which overrides stock one, you can't do that.
Stock keyboard's language is taken from iOS language setting (via Preferences > General > International).
您可以在键盘顶部设置自己的视图。 3.2 之后真的很容易,我在 这个答案。这意味着您可以使用自己的按钮,甚至可以在那里设置本地化文本。
编辑:这是一个糟糕的答案:) 抱歉,我没有看到“mobile-safari”标签。但就我而言,我还获得了键盘上一个/下一个按钮的本地化版本。
You can set your own view on top of the keyboard. It is really easy after 3.2 and I have some sample code in this answer. That means you can use your own buttons and even set localized text there.
EDIT: That was a bad answer :) Sorry, I didn't see the 'mobile-safari' tag. But in my case, I also get localized versions of the keyboard previous/next buttons.