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

 LucifinilC_925 发布于 2022-11-12 20:53



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();
1 个回答
  • 打开platforms下的iOS工程,如图修改语言

    2022-11-12 20:53 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有