Hello

I am using JQuery datepicker pop up in a view on a site in French. The months and days are appearing in English in the pop-ups.

I downloaded : jquery.ui.datepicker-fr.js that I call in my pages thanks to an entry in my theme .info file :

scripts[] = scripts/jquery.ui.datepicker-fr.js

If I check the head of my pages I have the jquery.ui.datepicker-fr.js that appears after the jquery.ui.datepicker.min.js

Even if I empty my caches and reload I'm still getting my pop-ups in English.

I've looked around on the formu and on the web and I haven't found any solution to this problem. Maybe I'm going about it the wrong way.

any help would be appreciated.

Comments

apprentia’s picture

This is where i got the info about the localisation :

http://jqueryui.com/demos/datepicker/

Maybe I'm missing something that should be passed to the object so that it "knows" it should be in French.

rodrigoaguilera’s picture

how do you solved this?

zorax’s picture

Subscribe!
Did you get french translation in the pop-up (format, name of day..)
Cordialement,

calhemp’s picture

Hi, the same, i'm finding a way to show in spanish or catalan.

Neilorym’s picture

Try adding the following to your template.php file:

$jquery_js = 'sites/all/libraries/jquery.ui/ui/i18n/ui.datepicker-fr.js';
drupal_add_js($jquery_js);

aronne’s picture

Hi all guys, i've just solved this issue in 5 steps:
(this is an example of italian localization)

  • I've downloaded the localization file from http://code.google.com/p/jquery-ui/source/browse/branches/labs/datepicke...
  • Edit this file replacing all "$.ui.datepicker" occurences with "$.datepicker"
  • Add this line in yourtheme.info file:
    ; Optionally add some JavaScripts to your theme.
    scripts[] = js/jquery.ui.datepicker-it.js
    ;...other js files
  • Add this line in yourscript.js file (of your theme for example):
    jQuery(function($){
        var language = "it"; //if you have a multilanguage site you should set this varibale in the current user language
        $.datepicker.setDefaults( $.datepicker.regional[language] );
    });
    
  • Clear all caches

I hope this will work for you too, because it works for me.
Pay attention in one thing: jquery.ui.datepicker-it.js must be loaded before than yourscript.js

Bell@