--- CalendarPlugin.pm.1013 2004-04-30 08:43:17.000000000 +0200 +++ CalendarPlugin.pm 2004-04-30 08:42:47.000000000 +0200 @@ -104,6 +104,7 @@ weekstartsonmonday => '0', # other options not belonging to HTML::CalendarMonthSimple daynames => undef, # order is: Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday + lang => 'en', topic => $topic, web => $web, format => "" @@ -268,7 +269,8 @@ # read and set the desired language my $lang = scalar &TWiki::Func::extractNameValuePair( $attributes, "lang" ); - Date::Calc::Language(Date::Calc::Decode_Language($lang)) if $lang; + $lang = $lang ? $lang : $defaults{lang}; + Date::Calc::Language(Date::Calc::Decode_Language($lang)); # get GMT offset my ($currentYear, $currentMonth, $currentDay, $currentHour, $currentMinute, $currentSecond) = Today_and_Now(1); @@ -291,11 +293,9 @@ my $cal = new HTML::CalendarMonthSimple(month => $m, year => $y, today_year => $currentYear, today_month => $currentMonth, today_date => $currentDay); # set the day names in the desired language - if ($lang) { - $cal->saturday(Date::Calc::Day_of_Week_to_Text(6)); - $cal->sunday(Date::Calc::Day_of_Week_to_Text(7)); - $cal->weekdays(map { Date::Calc::Day_of_Week_to_Text $_ } (1..5)); - } + $cal->saturday(Date::Calc::Day_of_Week_to_Text(6)); + $cal->sunday(Date::Calc::Day_of_Week_to_Text(7)); + $cal->weekdays(map { Date::Calc::Day_of_Week_to_Text $_ } (1..5)); my $p = ""; while (($k,$v) = each %options) {