1
0

Make the calendars translatable.

This commit is contained in:
rWatcher 2010-03-01 00:42:06 -05:00
parent 7903bc085c
commit 954d88e5b6

View File

@ -50,7 +50,7 @@ class PHPCalendar_Core {
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 <caption>. 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 @@ class PHPCalendar_Core {
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 .= '<th abbr="'.htmlentities($d).'">'.htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d).'</th>';
$calendar .= '<th abbr="'.htmlentities($d).'">'.t(htmlentities($day_name_length < 4 ? substr($d,0,$day_name_length) : $d)).'</th>';
$calendar .= "</tr>\n<tr>";
}