简体   繁体   中英

How to translate ios cordova long press.

I am new to HTML5 development and I am building a simple cordova app. In IOS when you click a text and press long press you will see the following options.

  • Copy
  • Select All
  • Define
  • Share...

Is there a way to translate this words. I changed the language of the phone but the above options are not translating. Can anyone help me. Thank you.

You can add other languages to your project adding this on the info.plit (with a plugin or a hook)

<key>CFBundleLocalizations</key>
<array>
    <string>es</string>
    <string>fr</string>
    <string>...</string>
</array>

or if you just support one language, you can just change English here for another language

<key>CFBundleDevelopmentRegion</key>
<string>English</string>

There is an existing plugin to write on the info.plist https://www.npmjs.com/package/cordova-custom-config

You can use it or use your own plugin that just a config-file tag to add that lines http://cordova.apache.org/docs/en/latest/plugin_ref/spec.html#config-file

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