如何本地化 jQuery UI Datepicker? [英] How do I localize the jQuery UI Datepicker?

查看:20
本文介绍了如何本地化 jQuery UI Datepicker?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的需要一个本地化的下拉日历.英语日历并不能在挪威网站上准确传达卓越性 ;-)

I really need a localized dropdown calendar. An English calendar doesn't exactly communicate excellence on a Norwegian website ;-)

我已经尝试过 jQuery DatePicker,他们的网站说它可以本地化,但这似乎不起作用.

I have experimented with the jQuery DatePicker, their website says it can be localized, however that doesn't seem to work.

我正在使用 ASPNET.MVC,而且我真的很想坚持使用一个 javascript 库.在本例中为 jQuery.

I am using ASPNET.MVC, and I really want to stick to one javascript library. In this case jQuery.

ajax 工具包日历是可以接受的,只要它也能显示挪威名字.

The ajax toolkit calendar would be acceptable, if only it too would display Norwegian names.

更新:太棒了!我发现我缺少语言文件,一个不那么小的细节:-)

推荐答案

对于那些仍然有问题的,你必须从这里下载你想要的语言文件:

For those that still have problems, you have to download the language file your want from here:

https://github.com/jquery/jquery-ui/树/master/ui/i18n

然后将其包含在您的页面中,例如(意大利语):

and then include it in your page like this for example(italian language):

<script type="text/javascript" src="/scripts/jquery.ui.datepicker-it.js"></script>

然后使用 zilverdistel 的代码 :D

这篇关于如何本地化 jQuery UI Datepicker?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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