问题
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