Adding language support for the new agenda_js.php script

skala
Julio Montoya 14 years ago
parent 4e85f0e695
commit b2c37cb803
  1. 15
      main/calendar/agenda_js.php
  2. 7
      main/template/default/agenda/month.tpl

@ -43,6 +43,21 @@ if (!api_is_anonymous() && $type == 'personal') {
$can_add_events = 1;
}
//Setting translations
$day_short = api_get_week_days_short();
$days = api_get_week_days_long();
$months = api_get_months_long();
$months_short = api_get_months_short();
$tpl->assign('month_names', json_encode($months));
$tpl->assign('month_names_short', json_encode($months_short));
$tpl->assign('day_names', json_encode($days));
$tpl->assign('day_names_short', json_encode($day_short));
$tpl->assign('button_text', json_encode(array('today'=>get_lang('Today'), 'month'=>get_lang('Month'), 'week'=>get_lang('Week'), 'day'=>get_lang('Day'))));
$tpl->assign('type', $type);
$tpl->assign('can_add_events', $can_add_events);

@ -17,8 +17,13 @@ $(document).ready(function() {
header: {
left: '',
center: 'title',
right: 'today prev,next month,agendaWeek,agendaDay'
right: 'today prev,next month,agendaWeek,agendaDay',
},
buttonText: {$button_text},
monthNames: {$month_names},
monthNamesShort:{$month_names_short},
dayNames: {$day_names},
dayNamesShort: {$day_names_short},
selectable : true,
selectHelper: true,
select: function(start, end, allDay, jsEvent, view) {

Loading…
Cancel
Save