简体   繁体   English

在导出到Xcode项目之前,如何在Cordova项目上更改主要应用程序语言?

[英]How to change main app language on a Cordova project before exporting to Xcode project?

I'm creating a Cordova Project on Eclipse Luna, using the THYM (The Hybrid Mobile) Eclipse plugin, version 0.3. 我正在使用THYM(混合移动)Eclipse插件版本0.3在Eclipse Luna上创建一个Cordova项目。 Using Cordova 3.7.2(Android) and Cordova 3.8(iOS). 使用Cordova 3.7.2(Android)和Cordova 3.8(iOS)。

Every time i have a release, i export the cordova project to a native project format (in my case, Xcode format and Android Studio format). 每次发布时,我都会将cordova项目导出为本机项目格式(在我的情况下为Xcode格式和Android Studio格式)。 But the main language on the native project formats is English, and i need to define another language (Portuguese) for it. 但是本机项目格式上的主要语言是英语,我需要为其定义另一种语言(葡萄牙语)。

I know that i can do this(manually) on the MyApp-Info.plist on Xcode after the export, but that's not what i want, since this makes me manually repeat the modification every time i create a new release on Eclipse. 我知道导出后可以在Xcode的MyApp-Info.plist上(手动)执行此操作,但这不是我想要的,因为这使我每次在Eclipse上创建新发行版时都手动重复修改。

Some configuration on the config.xml, maybe? 可以在config.xml上进行一些配置吗?

config.xml config.xml中

<config-file platform="ios" parent="CFBundleDevelopmentRegion" overwrite="true">
<string>Portuguese</string>
</config-file>

Put this in the config.xml, under the <platform name="ios"> tag 将其放在<platform name="ios">标记下的config.xml中

 <edit-config file="*-Info.plist" mode="merge" target="CFBundleDevelopmentRegion">
            <string>Spanish</string>
 </edit-config>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM