Reputation: 19030
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", "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 :(
Upvotes: 27
Views: 29894
Reputation: 1
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>
Upvotes: 28
Reputation: 10402
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.
Upvotes: 0