Skip to content

Commit

Permalink
Make the calendars translatable.
Browse files Browse the repository at this point in the history
  • Loading branch information
rWatcher committed Mar 1, 2010
1 parent 7903bc0 commit 954d88e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/calendarview/libraries/PHPCalendar.php
Expand Up @@ -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 <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
Expand All @@ -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 .= '<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>";
}

Expand Down

0 comments on commit 954d88e

Please sign in to comment.