问题
Using Cordova/Phonegap, what is the easiest way to translate the "Done" button present on the iOS virtual keyboard?
For instance, my iPhone is configured as using French language.
However, the button still shows "Done" button and not the classic French adapted word: "Ok".
回答1:
I was facing the same problem with my cordova app. I fixed it with a plugin that writes in the Info.plist
<plugin id="com.example.plugin" version="0.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>Example</name>
<description>A label translate example</description>
<platform name="ios">
<config-file target="*-Info.plist">
<key>CFBundleAllowMixedLocalizations</key>
<array>
<string>Yes</string>
</array>
<key>CFBundleLocalizations</key>
<array>
<string>fr</string>
</array>
<key>CFBundleDevelopmentRegion</key>
<array>
<string>fr_FR</string>
</array>
</config-file>
</platform>
</plugin>
回答2:
Setting this property in Info tab was enough:
回答3:
Setting CFBundleAllowMixedLocalizations .plist key is also possible via your config.xml. Just add this in your iOS platform configuration:
<platform name="ios">
<config-file parent="CFBundleAllowMixedLocalizations" platform="ios" target="*-Info.plist">
<true />
</config-file>
</platform>
来源:https://stackoverflow.com/questions/25954478/translating-done-button-on-ios-keyboard-to-other-language