CDN上的可用翻译为jquery.validate

时间:2012-09-24 16:10:58

标签: jquery jquery-validate locale cdn

我在多语言项目中使用Jquery.validate。

一切都很好,但我有两个问题(好吧,我真正的问题是第2号):

1)我从Microsoft CDN加载它:http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js并且与谷歌CDN相比“似乎”相当慢?

2)要显示本地化的错误消息,我包括: http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_xx.js(其中xx是正在使用的语言环境),如此处以及我在网上找到的所有其他文档中所示:http://www.asp.net/ajaxlibrary/CDNjQueryValidate19.ashx

这适用于de,fr,es,ja但不适用于常见的其他语言环境,如nl,pt等。 有谁知道如何获得所有可用的“消息文件”列表?我只是想加载它们,如果它们可用,因为“尝试没有成功”需要花费很多时间......

并且:如果您知道另一个CDN在哪里获取jquery.validate以及翻译文件:我将很乐意从那里下载: - )

谢谢!

2 个答案:

答案 0 :(得分:6)

我不知道另一个托管jquery validate的本地化文件的CDN。我向Microsoft CDN发送了each of the localization files的请求:

结果

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_ar.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_bg.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_ca.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_cs.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_da.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_de.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_el.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_es.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_eu.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_fa.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_fi.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_fr.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_he.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_hu.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_it.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_ja.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_kk.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_lt.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_lv.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_nl.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_no.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_pl.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_ro.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_ru.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_si.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_sk.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_sl.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_th.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_tr.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_vi.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/methods_de.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/methods_nl.js

未找到(404)

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_hr.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_ka.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_pt_BR.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_pt_PT.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_sr.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_sv.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_uk.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_zh.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/messages_zh_TW.js

http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/localization/methods_pt.js

答案 1 :(得分:1)