环境
xcode:8.3.3
ionic:3.9.2
cordova:7.0.1
图片选择组件有两个cordova-plugin-camera和cordova-image-picker
Android下能正常使用,不需要汉化,IOS下汉化步骤:
1、修改info.plist(如果没有Localizations 点击加号可以添加该项)
2、在Resources目录下创建文件(可以在外部创建后,拖入)
文件夹名称:zh-Hans.lproj
内部文件名称:GMImagePicker.strings
填写:
/* Cancel */
"picker.navigation.cancel-button"="取消";
/* Done */
"picker.navigation.done-button"="完成";
/* Navigation bar default title */
"picker.navigation.title"="选择相册";
/* %@ Items Selected */
"picker.selection.multiple-items"="已选择%@个项目";
/* %@ Photos Selected */
"picker.selection.multiple-photos"="已选择%@张照片";
/* %@ Videos Selected */
"picker.selection.multiple-videos"="已选择%@个视频";
/* 1 Photo Selected */
"picker.selection.single-photo"="已选择1张照片";
/* 1 Video Selected */
"picker.selection.single-video"="已选择1个视频";
/* All photos */
"picker.table.all-photos-label"="相机胶卷";
/* Smart Albums */
"picker.table.smart-albums-header"="智能相册";
/* Albums */
"picker.table.user-albums-header"="相册";
/* Confirmation of single selection alert title */
"picker.confirm.title"="是否确定?";
/* Confirmation of single selection alert message */
"picker.confirm.message"="是否要选择您所点击的图片?";
/* Action (button) deny/no/refuse */
"picker.action.no"="取消";
/* Action (button) agree/yes/approve */
"picker.action.yes"="确定";
如果还是不行,可尝试见en文件夹下的文件内容改为上述内容试试。
以上是项目中遇到的问题及一些解决办法。