如何本地化Cordova iOS项目? [英] How to localize Cordova iOS projects?

查看:68
本文介绍了如何本地化Cordova iOS项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在Internet上进行搜索,但是发现没有一种解决方案似乎可行,所以我的问题是使用Xcode 6,我们如何本地化Cordova应用程序?

I've been searching on the Internet but none of the solutions I found seems to work so, my question is with Xcode 6, how we could localize a Cordova app?

下图说明了该问题,我在iOS模拟器中测试了该应用程序(我将模拟器的语言设置更改为西班牙语),但是输入或某些插件(如相机)中的上下文菜单仍为英语.我将"本地化本地开发区域"更改为" es ",但仍然使用英语.我在 es.lproj 文件夹中也有Localizable.strings.

The image below illustrates the problem, I tested the app in the iOS Simulator (I changed the language settings of the simulator to Spanish) but the context menu in inputs or some plugin like camera are still in English. I changed the "Localization native development region" to "es" but still in English. Also I have Localizable.strings in the es.lproj folder.

推荐答案

最后,我在进行了一些挖掘之后发现了这个问题,并在一个对我在其他论坛中提供了极大帮助的人的帮助下,您必须将其放入项目中. :

Finally I figured out after some digging and with the help of a guy that greatly assisted me in other forum, you have to put this in the project .plist this:

<key>CFBundleLocalizations</key>
<array>
    <string>es</string>
</array>

每个字符串都是您要本地化的语言.

Each string is the language you want to localize.

这篇关于如何本地化Cordova iOS项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆