【发布时间】:2014-09-21 00:08:42
【问题描述】:
使用 Cordova/Phonegap,翻译 iOS 虚拟键盘上的“完成”按钮最简单的方法是什么?
例如,我的 iPhone 被配置为使用法语。
但是,按钮仍然显示“完成”按钮,而不是经典的法语改编词:“Ok”。
【问题讨论】:
-
有同样的问题:o
标签: ios cordova translation
使用 Cordova/Phonegap,翻译 iOS 虚拟键盘上的“完成”按钮最简单的方法是什么?
例如,我的 iPhone 被配置为使用法语。
但是,按钮仍然显示“完成”按钮,而不是经典的法语改编词:“Ok”。
【问题讨论】:
标签: ios cordova translation
我的科尔多瓦应用程序也面临同样的问题。我用一个写在 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>
【讨论】:
config-file 中使用parent= 设置密钥,但后来它起作用了。 Example is here
在 Info 选项卡中设置此属性就足够了:
【讨论】:
也可以通过您的config.xml 设置CFBundleAllowMixedLocalizations .plist 密钥。只需将其添加到您的 iOS 平台配置中:
<platform name="ios">
<config-file parent="CFBundleAllowMixedLocalizations" platform="ios" target="*-Info.plist">
<true />
</config-file>
</platform>
【讨论】: