views:

118

answers:

1

Hi all!

I am trying to translate JQuery's datepicker without much success. With the code below, months get correctly translated, while the days (short) are not translated! What's wrong?

<script type="text/javascript">
  $(function() {
    ...
    $("#datepicker").datepicker({
      onChangeMonthYear: function(year, month, inst) {...},
      beforeShowDay: function(date) {...},
      onSelect: function(dateText, inst) {...},

      dayNamesShort: ['D', 'L', 'M', 'M', 'G', 'V', 'S'],
      dayNames: ['Domenica', 'Lunedì', 'Martedì', 'Mercoledì', 'Giovedì', 'Venerdì', 'Sabato'],
      monthNames: ['Gennaio','Febbraio','Marzo','Aprile','Maggio','Giugno','Luglio','Agosto','Settembre','Ottobre','Novembre','Dicembre'],
      monthNamesShort: ['Gen','Feb','Mar','Apr','Mag','Giu','Lug','Ago','Set','Ott','Nov','Dic'],
      firstDay: 1
    });
  }
  );
</script>
+1  A: 

From the source code:

dayNamesShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], // For formatting
dayNamesMin: ['Su','Mo','Tu','We','Th','Fr','Sa'], // Column headings for days starting at Sunday

You alse need to translate dayNamesMin.

kgiannakakis
Thanks! I read the docs three or four times yesterday, and I missed that!! Maybe I shoud get a new monitor ;-)
Palantir