2014-09-21 54 views
6

使用Cordova/Phonegap,翻譯iOS虛擬鍵盤上的「完成」按鈕的最簡單方法是什麼?將iOS鍵盤上的「完成」按鈕翻譯爲其他語言

例如,我的iPhone配置爲使用法語。
但是,按鈕仍然顯示「完成」按鈕,而不是經典的法語改編詞:「好」。

+0

有同樣的問題:○ – Alpha 2014-09-24 14:05:27

回答

4

我正面臨與我的科爾多瓦應用程序相同的問題。我在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> 
+1

出於某種原因,我需要使用'父=''中的配置,file'設置鍵,但後來它的工作。 [例子是這裏](https://github.com/escapedcat/cordova-plugin-localization-ios) – escapedcat 2015-09-17 05:28:01

+0

它不適合我在iPhone 7中使用..你有什麼想法嗎? – 2018-02-22 17:37:47

2

信息選項卡設置該屬性寫入一個插件是足夠的固定它:

enter image description here

+0

我沒有我的地區在這個列表中,該怎麼辦? – 2017-06-30 07:06:37

+0

隨着這種變化,鍵盤將始終顯示單一語言..它不會與i18n一起使用。 – 2018-02-22 17:37:02

1

設置CFBundleAllowMixedLocalizations的.plist鍵也可以通過您的​​3210。只需在您的iOS平臺的配置加上這一句:

<platform name="ios"> 
    <config-file parent="CFBundleAllowMixedLocalizations" platform="ios" target="*-Info.plist"> 
    <true /> 
    </config-file> 
</platform> 
+0

其不工作... – 2018-02-22 17:35:57

+0

這是在我的工作。 「完成」按鈕用法語翻譯爲「OK」。你有沒有檢查你的Info.plist文件在Xcode中已經改變了?請檢查iOS設備語言嗎?決定要顯示的語言是設備操作系統。 – Mao 2018-02-22 17:49:10

+0

不,它沒有被炒魷魚。 – 2018-02-22 18:05:10

相關問題