简体   繁体   中英

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

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.

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

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM