How to localize app name in cordova for iOS?

非 Y 不嫁゛ 提交于 2021-02-11 15:01:34

问题


I am looking for a solution to localize my app's name in:

  • English (EN)
  • Chinese (Simplified) zh-Hans
  • Chinese (Traditional) zh-Hant

I am using build.phonegap to build my both apps so I cannot modify the platform code but instead it has to be from either some config on config.xml or using cordova hooks or any other solution. So far I found solution for android using hooks but it will not work for iOS.

Thanks


回答1:


For iOS you can do code in config.xml file.

<platform name="ios">
  <edit-config target="CFBundleLocalizations" file="*-Info.plist" mode="overwrite">
    <array>
      <string>en</string>
      <string>es</string>
    </array>
  </edit-config>
</platform>

Usage of <edit-config> in config.xml was introduced in Cordova 6.4.0.



来源:https://stackoverflow.com/questions/57656349/how-to-localize-app-name-in-cordova-for-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!