开发者

How to load jQuery UI from Google CDN with locale different than English?

I would like load a different than English language locale for jQuery UI, while loading jQuery UI from Google Hosted Libraries CDN?

Is there a way to pass I18n parameter into load function?

google.load("jqueryui"开发者_如何学C, "1.7.2")

I have also tried as per jQuery UI documentation on Datepicker internationalization to pass:

$(selector).datepicker($.datepicker.regional['pl']);

... but it did not do the trick :(


http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/i18n/jquery-ui-i18n.min.js

EDIT:

It work's only google.load is omitted and standard JavaScript loading is used:

  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/i18n/jquery-ui-i18n.min.js"></script>


I realize that this may not be the answer you are looking for, but I stumbled upon your question when solving the very same problem. I am approaching this by loading the i18n libraries from the local server:

<script type="text/javascript" 
src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"></script>

<!-- local resource -->
<script type="text/javascript" src="/js/ui/i18n/jquery-ui-i18n.js"></script> 

this code then works:

$(selector).datepicker($.datepicker.regional['pl']);

I am still interested in how to load the jquery-ui-i18n.js from a CDN.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜