javascript - ionic 项目中使用ngCordova中的插件,界面显示为英文,怎么改成中文?

查看:115
本文介绍了javascript - ionic 项目中使用ngCordova中的插件,界面显示为英文,怎么改成中文?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问 题



date-picker插件的就是文件:可以修改为zh_cn

    var defaults = {
        mode: 'date',
        date: new Date(),
        allowOldDates: true,
        allowFutureDates: true,
        minDate: '',
        maxDate: '',
        doneButtonLabel: '确定',
        doneButtonColor: '#007AFF',
        cancelButtonLabel: '取消',
        cancelButtonColor: '#007AFF',
        locale: "NL",
        x: '0',
        y: '0',
        minuteInterval: 1,
        popoverArrowDirection: this._popoverArrowDirectionIntegerFromString("any"),
        locale: "zh_cn"
    };

image-picker插件的就是文件:

cordova.define("cordova-plugin-image-picker.ImagePicker", function(require, exports, module) {

var ImagePicker = function() {

};


ImagePicker.prototype.getPictures = function(success, fail, options) {
    if (!options) {
        options = {};
    }
    
    var params = {
        maximumImagesCount: options.maximumImagesCount ? options.maximumImagesCount : 15,
        width: options.width ? options.width : 0,
        height: options.height ? options.height : 0,
        quality: options.quality ? options.quality : 100
    };

    return cordova.exec(success, fail, "ImagePicker", "getPictures", [params]);
};

window.imagePicker = new ImagePicker();

解决方案

打开platforms下的iOS工程,如图修改语言

这篇关于javascript - ionic 项目中使用ngCordova中的插件,界面显示为英文,怎么改成中文?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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