如何在iOS的cordova中本地化应用名称? [英] How to localize app name in cordova for iOS?
本文介绍了如何在iOS的cordova中本地化应用名称?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在寻找一种将应用程序名称本地化的解决方案:
I am looking for a solution to localize my app's name in:
- 英语(EN)
- 简体中文zh-Hans
- 中文(繁体)zh-Hant
我正在使用build.phonegap来构建我的两个应用程序,因此我无法修改平台代码,而是必须来自config.xml上的某些配置或使用cordova挂钩或任何其他解决方案.到目前为止,我已经找到了使用钩子的android解决方案,但不适用于iOS.
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.
谢谢
推荐答案
对于iOS,您可以在config.xml文件中进行编码.
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>
config.xml 中的< edit-config>
的用法在
Usage of <edit-config>
in config.xml
was introduced in Cordova 6.4.0.
这篇关于如何在iOS的cordova中本地化应用名称?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文