如何更改selected.js中警报的语言? [英] How to change the language for alerts in chosen.js?

查看:85
本文介绍了如何更改selected.js中警报的语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当您在selected.js中的多个选择框中键入不可用选项时,它将生成输出'无结果匹配'查询'。有没有办法改变输出语言?

When you type in an unavailable option in the multiple select box in chosen.js, it will generate the output 'No results match "query"'. Is there a way to change the output language?

推荐答案

您可以为它设置默认消息 -

You can set default message for it -

// jQuery version: https://github.com/harvesthq/chosen/blob/master/example.jquery.html
$(".chzn-select").chosen({no_results_text: "Translated No results matched"});

// Prototype version: https://github.com/harvesthq/chosen/blob/master/example.proto.html
new Chosen($$(".chzn-select")[element_index],{no_results_text: "Translated No results matched"});

除此之外,似乎没有任何i18n支持。

Except this, there doesn't seem to be any i18n support.

这篇关于如何更改selected.js中警报的语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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