开发者

iPhone keyboard in UIWebView, how to change the language of next/previous and done buttons

开发者 https://www.devze.com 2023-03-17 12:25 出处:网络
UIWebView\'s keyboard is pretty cool with its next/previous and do开发者_如何学JAVAne buttons. However, I was not able to find and change the button titles. The titles are always in english no matter

UIWebView's keyboard is pretty cool with its next/previous and do开发者_如何学JAVAne 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.


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 :)


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).


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消