The preferred answer is correct but has the drawback to be native, i. e. you have to modify the Info*.plist after cordova prepare.
If you want to stick with the Cordova's style (which i recommend), you can use a hook or a plugin for this.
I did it with a plugin because a plugin has (from scratch) the ability to modify the native configuration's files (AndroidManifest.xml or Info*.plist).
See https://mcmap.net/q/1175456/-translating-quot-done-quot-button-on-ios-keyboard-to-other-language
What I've done :
- make a new specific plugin name "cordova-plugin-config-ios"
localPlugins/cordova-plugin-config-ios/plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<plugin id="cordova-plugin-config-ios" version="0.0.1" xmlns="http://apache.org/cordova/ns/plugins/1.0">
<name>CRM Factory Cordova Localization iOS Plugin</name>
<description>A label translate example</description>
<!-- ios -->
<platform name="ios">
<config-file target="*-Info.plist" parent="CFBundleDevelopmentRegion">
<array>
<string>French</string>
</array>
</config-file>
<config-file target="*-Info.plist" parent="CFBundleLocalizations">
<array>
<string>fr_FR</string>
</array>
</config-file>
</platform>
</plugin>
- make a hook add-local-plugins.sh. In it, install the specific plugin made
add-local-plugins.sh
echo "Install specific plugin for modify Info*.plist"
cordova plugin add cordova-plugin-config-ios --searchpath ${projectDir}/localPlugins/cordova-plugin-config-ios
- call the hook via config.xml
config.xml
<hook src="hooks/add-local-plugins.sh" type="before_prepare" />
In my case, the hook was not mandatory but I like the freedom brought by it and to be able to log what the program did (echo part).
<custom-config-file parent="CFBundleLocalizations" platform="ios" target="*-Info.plist">
instead of theedit-config
then it worked for me. – Marmolada