Love to code, although it bugs me.

JQuery Datepicker - Add Portuguese Localization

No comments
Got this from here. I'm re-posting it because it's a good example for any localization you'd want to perform on the JQuery UI date picker control:


/* Portuguese initialisation for the jQuery UI date picker plugin. */
/* Based on the Brazilian initialisation */
jQuery(function($){
 $.datepicker.regional['pt'] = {
  closeText: 'Fechar',
  prevText: '<Anterior',
  nextText: 'Seguinte',
  currentText: 'Hoje',
  monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho',
  'Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
  monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun',
  'Jul','Ago','Set','Out','Nov','Dez'],
  dayNames: ['Domingo','Segunda-feira','Terça-feira','Quarta-feira','Quinta-feira','Sexta-feira','Sábado'],
  dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
  dayNamesMin: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'],
  weekHeader: 'Sem',
  dateFormat: 'dd/mm/yy',
  firstDay: 0,
  isRTL: false,
  showMonthAfterYear: false,
  yearSuffix: ''};
 $.datepicker.setDefaults($.datepicker.regional['pt']);
});

HTH.

No comments :

Post a Comment