1 Reply Latest reply on Jun 9, 2016 6:30 AM by martinb77004568

    Native controls not translated in iOS

    martinb77004568 Level 1

      I am building an application using PGB with cli-6.0.0. In my app, I have a standard html input field. When long pressing on this field, I get the option to "Paste" (like expected). My problem: It seems like the native text ("Paste") is always English. My iPad Air 2 is set to German but still I see the English text.

       

      I have tried to change the language like so:

      <gap:config-file platform="ios" parent="CFBundleDevelopmentRegion" mode="replace">
              <array>
                  <string>German</string>
              </array>
          </gap:config-file>
          <gap:config-file platform="ios" parent="CFBundleLocalization" mode="replace">
              <array>
                  <string>German</string>
              </array>
      </gap:config-file>
      

       

      But it doesn't seem to work. The text remains English.

      I have unpacked the .ipa file and converted the Info.plist to xml. It seems to be applied correctly:

      <key>CFBundleDevelopmentRegion</key>
          <array>
              <string>German</string>
          </array>
      

      and

      <key>CFBundleLocalization</key>
          <array>
              <string>German</string>
          </array>
      

       

      My question: How can I tell my app/device to show the native controls in the system's language? Btw: The keyboard is German so it is only things like "Paste" or (on file inputs) "Photo Library" that don't get translated.

       

      Maybe it helps (or not) that the config.xml from the .ipa file includes

       <name>
              Hello Cordova
          </name>
          <description>
               A sample Apache Cordova application that responds to the deviceready
              event. 
          </description>
          <author email='dev@cordova.apache.org' href='http://cordova.io'>
               Apache Cordova Team 
          </author>
      

      but I am actually setting these values in my config.xml to something different. Does PGB maybe have problems interpreting my config.xml and set default values instead?

       

      Thanks for your help!

        • 1. Re: Native controls not translated in iOS
          martinb77004568 Level 1

          OK, I managed to fix this by defining these settings (I use en-US as fallback language) :

           

          <gap:config-file platform="ios" parent="CFBundleDevelopmentRegion" mode="replace">
                  <array>
                      <string>en-US</string>
                  </array>
              </gap:config-file>
              <gap:config-file platform="ios" parent="CFBundleLocalizations" mode="replace">
                  <array>            
                      <string>en</string>
                      <string>de</string>        
                  </array>
              </gap:config-file>