I’m trying to set jQuery UI widgets up so that they can be internationalized. I configured the datepicker as follows:
$.datepicker.setDefaults($.datepicker.regional['fr']);
And that triggers an attempted AJAX load, but it is using a URL that I don’t want to use (http://jqueryui.com/ui/i18n/ui.datepicker-fr.js).
The URL it’s trying to use seems to be incorrect, as it returns a Not Found error. Besides, I have a local copy of the internationalization files and I want the datpicker to use that instead.
How do I configure where jQuery UI looks for its internationalization files? i’ve not managed to find it in the documentation, and googling hasn’t so far turned up anything useful yet.
UPDATE: I have found that explicitly including the localization I want with a <script> tag works, it sets the date picker to the correct language. However, according to the console, it still tries to load a translation file from jqueryui.com as well anyway. I’d like to disable this if at all possible, because it’s unnecessary and it doesn’t work anyway.
jQuery UI’s
datepickerplugin doesn’t do XHR requests to bring in the i18n files.It expects you to include the
<script>tag to bring in the appropriate i18n file (for example http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/i18n/jquery.ui.datepicker-fr.js).Live example http://jsbin.com/obixag/2.
I’m guessing that something else is doing the XHR.