如何在iOS中更改cordova-camera-plugin语言? [英] How to change cordova-camera-plugin language in iOS?
问题描述
我想更改 cordova-camera-plugin
语言。显然它是依赖于各种各样的东西。我的开发环境是Visual Studio 2015中Cordova的工具。这不太可能,但是我在我的应用程序中使用Ionic框架。我们在运行Xcode 7的MacBook Pro笔记本电脑上为iOS生成应用程序。我测试的设备是运行iOS 9.1的Ipad,荷兰语作为第一语言,英语作为第二语言。
在我的应用程序,当你打开相机,你有几个选项,如取消
,使用照片
c $ c>重新拍摄照片。
我做了一些事情,试图使插件本地化为荷兰语。 / p>
在 config.xml
我已将以下行更改为
< widget xmlns:cdv =http://cordova.apache.org/ns/1.0
xmlns:vs =http://schemas.microsoft .com / appx / 2014 / htmlapps
id =hop.test1
version =1.0.1
xmlns =http://www.w3.org/ns/ widgets
defaultlocale =nl-NL>
并在我的 /platforms/ios/projectname/projectname-Info.plist我添加了
以下行:
< plist version =1.0>
< dict>
< key> CFBundleDevelopmentRegion< / key>
< string> nl< / string>
< key> CFBundleLocalizations< / key>
< array>
< string> nl< / string>
< / array>
<! - 其他值省略! - >
< / dict>
< / plist>
nl
似乎是正确的本地化符号根据我在google和stackoverflow周围的搜索结果显示的荷兰语。
问题是,当我构建我的应用程序并测试相机时,相机按钮仍然是用英语写的。我实现了一些错误,我错过了一些值在某个地方,或者这是错误的方式去本地化插件在cordova?
p>只需在Xcode中进行设置。在您制作另一个cordova版本之后,它们不会被覆盖:
UPDATE:
如果您没有输入Localization native development region,则:
- 转至信息 - >选择您的目标
- 右键单击现有键条目,然后选择添加行
- 键入«Localization ...»,当Xcode自动完成您的输入,然后选择值以下您的语言。
I wish to change the cordova-camera-plugin
language. Apparently it is dependent on a variety of things. My development environment is Tools for Cordova in Visual Studio 2015. It is unlikely that it matters but I am using the Ionic framework in my app. We build our app for iOS on a MacBook Pro laptop running Xcode 7. The device I am testing on is an Ipad running iOS 9.1 with Dutch as first language and english as second.
In my app when you open the camera you have a few options such as Cancel
, Use Photo
and Retake Photo
.
The things I have done to try and make the plugin localized to the Dutch language are the following.
In config.xml
I have changed the following line to
<widget xmlns:cdv="http://cordova.apache.org/ns/1.0"
xmlns:vs="http://schemas.microsoft.com/appx/2014/htmlapps"
id="hop.test1"
version="1.0.1"
xmlns="http://www.w3.org/ns/widgets"
defaultlocale="nl-NL">
And in my /platforms/ios/projectname/projectname-Info.plist I have added the
following lines:
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>nl</string>
<key>CFBundleLocalizations</key>
<array>
<string>nl</string>
</array>
<!-- other values omitted !-->
</dict>
</plist>
nl
appears to be the correct localization notation for dutch based on my search results around google and stackoverflow.
The problem is that when I build my app and test the camera, the camera buttons are still written in english. Have I implemented something wrong, am I missing some values somewhere or is this the wrong way to go about localizing a plugin in cordova?
Just make the settings in Xcode. They will not be overwritten after you make another cordova build:
UPDATE:
If you don't have the entry «Localization native development region», then:
– Go to info -> select your target
– Right click on an existing key entry and choose Add Row
– Type «Localization …», when Xcode autocompletes your input, then select under value your language.
这篇关于如何在iOS中更改cordova-camera-plugin语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!