views:

418

answers:

2

I would like load a different than English language locale for jqueryui, while loading jqueryui form Google AJAX Libraries API CDN?

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

google.load("jqueryui", "1.7.2")

I have also tried as per jQueryUI documentation on date picker internationalization to pass:

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

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

A: 

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"&gt;&lt;/script&gt;

<!-- 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.

Marek
Even better you can get it from:http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/i18n/ui.datepicker-pl.js
WooYek
A: 

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"&gt;&lt;/script&gt;
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"&gt;&lt;/script&gt;
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/i18n/jquery-ui-i18n.min.js"&gt;&lt;/script&gt;
Z Bácsi