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

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工程,如图修改语言

【热门文章】
【热门文章】