From 954d88e5b6c8d72a433fa41338f7cd78e7f3c261 Mon Sep 17 00:00:00 2001 From: rWatcher Date: Mon, 1 Mar 2010 00:42:06 -0500 Subject: [PATCH] Make the calendars translatable. --- modules/calendarview/libraries/PHPCalendar.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/calendarview/libraries/PHPCalendar.php b/modules/calendarview/libraries/PHPCalendar.php index ae96a721..fba3f27c 100644 --- a/modules/calendarview/libraries/PHPCalendar.php +++ b/modules/calendarview/libraries/PHPCalendar.php @@ -50,7 +50,7 @@ function generate_calendar($year, $month, $days = array(), $day_name_length = 3, list($month, $year, $month_name, $weekday) = explode(',',gmstrftime('%m,%Y,%B,%w',$first_of_month)); $weekday = ($weekday + 7 - $first_day) % 7; #adjust for $first_day - $title = htmlentities(ucfirst($month_name)).' '.$year; #note that some locales don't capitalize month and day names + $title = t(htmlentities(ucfirst($month_name))).' '.$year; #note that some locales don't capitalize month and day names #Begin calendar. Uses a real . See http://diveintomark.org/archives/2002/07/03 @list($p, $pl) = each($pn); @list($n, $nl) = each($pn); #previous and next links, if applicable @@ -62,7 +62,7 @@ function generate_calendar($year, $month, $days = array(), $day_name_length = 3, if($day_name_length){ #if the day names should be shown ($day_name_length > 0) #if day_name_length is >3, the full name of the day will be printed foreach($day_names as $d) - $calendar .= ''.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).''; + $calendar .= ''.t(htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d)).''; $calendar .= "\n"; }