diff options
author | jwangen <jwangen> | 2002-10-03 04:36:10 +0000 |
---|---|---|
committer | jwangen <jwangen> | 2002-10-03 04:36:10 +0000 |
commit | 55e814ffba2d705112d9c0ca3d2b24539dd8dc26 (patch) | |
tree | 8434e93de2264ff0f728cfe4dc9b03afd69058cb | |
parent | 852cbafcdba1744f6544643641417eaf89e4831a (diff) | |
download | phpicalendar-55e814ffba2d705112d9c0ca3d2b24539dd8dc26.tar.gz phpicalendar-55e814ffba2d705112d9c0ca3d2b24539dd8dc26.tar.bz2 phpicalendar-55e814ffba2d705112d9c0ca3d2b24539dd8dc26.zip |
Localization update, every file changed, basically.
-rw-r--r-- | config.inc.php | 2 | ||||
-rw-r--r-- | day.php | 10 | ||||
-rw-r--r-- | functions/date_functions.php | 2 | ||||
-rw-r--r-- | functions/list_months.php | 2 | ||||
-rw-r--r-- | functions/list_weeks.php | 4 | ||||
-rw-r--r-- | languages/danish.inc.php | 40 | ||||
-rw-r--r-- | languages/dutch.inc.php | 39 | ||||
-rw-r--r-- | languages/english.inc.php | 19 | ||||
-rw-r--r-- | languages/french.inc.php | 40 | ||||
-rw-r--r-- | languages/german.inc.php | 38 | ||||
-rw-r--r-- | languages/italian.inc.php | 39 | ||||
-rw-r--r-- | languages/japanese.inc.php | 46 | ||||
-rw-r--r-- | languages/norwegian.inc.php | 39 | ||||
-rw-r--r-- | languages/polish.inc.php | 39 | ||||
-rw-r--r-- | month.php | 4 | ||||
-rw-r--r-- | month_bottom.php | 6 | ||||
-rw-r--r-- | sidebar.php | 16 | ||||
-rw-r--r-- | week.php | 6 |
18 files changed, 351 insertions, 40 deletions
diff --git a/config.inc.php b/config.inc.php index cc56c0a..4833c5e 100644 --- a/config.inc.php +++ b/config.inc.php @@ -4,7 +4,7 @@ $style_sheet = "silver"; // Themes support $calendar_path = "./calendars"; // path to directory with calendars $default_view = "day"; // default view for calendars = "day", "week", "month" $default_cal = "Home"; // exact filename of calendar without .ics -$language = "English"; // Language support - "English", "Polish", "German", "French", "Dutch", "Danish", "Italian", "Japanese", "Norwegian" +$language = "japanese"; // Language support - "English", "Polish", "German", "French", "Dutch", "Danish", "Italian", "Japanese", "Norwegian" $week_start_day = "monday"; // Day of the week your week starts on $use_sessions = "yes"; // For speedy performance on web servers, not good for localhost use. $day_start = "0700"; // Start time for day grid @@ -26,7 +26,7 @@ $unix_time = strtotime($getdate); $today_today = date ("Ymd"); $tomorrows_date = date( "Ymd", strtotime("+1 day", $unix_time)); $yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time)); -$display_date = strftime($dateFormat_day, $unix_time); +$display_date = localizeDate($dateFormat_day, $unix_time); // For the side months ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $getdate, $day_array2); @@ -44,11 +44,11 @@ $year3 = date("Y", DateAdd ("m", "+1", $date)); $first_sunday1 = sundayOfWeek($year1, $month1, "1"); $first_sunday2 = sundayOfWeek($year2, $month2, "1"); $first_sunday3 = sundayOfWeek($year3, $month3, "1"); -$display_month1 = strftime ($dateFormat_month, strtotime("-1 month", $date)); -$display_month2 = strftime ($dateFormat_month, $date); -$display_month3 = strftime ($dateFormat_month, strtotime("+1 month", $date)); +$display_month1 = localizeDate ($dateFormat_month, strtotime("-1 month", $date)); +$display_month2 = localizeDate ($dateFormat_month, $date); +$display_month3 = localizeDate ($dateFormat_month, strtotime("+1 month", $date)); $parse_month = date ("Ym", $date); -$thisday2 = strftime($dateFormat_week_list, $date); +$thisday2 = localizeDate($dateFormat_week_list, $date); $dayborder = 0; diff --git a/functions/date_functions.php b/functions/date_functions.php index f2e67d7..4b69c54 100644 --- a/functions/date_functions.php +++ b/functions/date_functions.php @@ -1 +1 @@ -<?php
// date_functions.php
// functions for returning or comparing dates
// takes Apple's 2 character day format and makes it into 3 characters
function two2threeCharDays($day) {
if ($day == "SU") $day_longer = "sun";
elseif ($day == "MO") $day_longer = "mon";
elseif ($day == "TU") $day_longer = "tue";
elseif ($day == "WE") $day_longer = "wed";
elseif ($day == "TH") $day_longer = "thu";
elseif ($day == "FR") $day_longer = "fri";
elseif ($day == "SA") $day_longer = "sat";
return $day_longer;
}
// dateOfWeek() takes a date in Ymd and a day of week in 3 letters or more
// and returns the date of that day. (ie: "sun" or "sunday" would be acceptable values of $day but not "su")
function dateOfWeek($Ymd, $day) {
global $week_start_day;
if (!$week_start_day) $week_start_day = "Sunday";
$timestamp = strtotime($Ymd);
$num = date("w", strtotime($week_start_day));
$start_day_time = strtotime((date("w",$timestamp)==$num ? "$week_start_day" : "last $week_start_day"), $timestamp);
return date("Ymd",strtotime($day,$start_day_time));
}
// function to compare to dates in Ymd and return the number of weeks
// that differ between them. requires dateOfWeek()
function weekCompare($now, $then) {
global $week_start_day;
$sun_now = dateOfWeek($now, $week_start_day);
$sun_then = dateOfWeek($then, $week_start_day);
$seconds_now = strtotime($sun_now);
$seconds_then = strtotime($sun_then);
$diff_seconds = $seconds_now - $seconds_then;
$diff_minutes = $diff_seconds/60;
$diff_hours = $diff_minutes/60;
$diff_days = round($diff_hours/24);
$diff_weeks = $diff_days/7;
return $diff_weeks;
}
// function to compare to dates in Ymd and return the number of days
// that differ between them.
function dayCompare($now, $then) {
$seconds_now = strtotime($now);
$seconds_then = strtotime($then);
$diff_seconds = $seconds_now - $seconds_then;
$diff_minutes = $diff_seconds/60;
$diff_hours = $diff_minutes/60;
$diff_days = round($diff_hours/24);
return $diff_days;
}
// function to compare to dates in Ymd and return the number of months
// that differ between them.
function monthCompare($now, $then) {
ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $now, $date_now);
ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $then, $date_then);
$diff_years = $date_now[1] - $date_then[1];
$diff_months = $date_now[2] - $date_then[2];
if ($date_now[2] < $date_then[2]) {
$diff_years -= 1;
$diff_months = ($diff_months + 12) % 12;
}
$diff_months = ($diff_years * 12) + $diff_months;
return $diff_months;
}
function yearCompare($now, $then) {
ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $now, $date_now);
ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $then, $date_then);
$diff_years = $date_now[1] - $date_then[1];
return $diff_years;
}
?>
\ No newline at end of file +<?php
// date_functions.php
// functions for returning or comparing dates
// takes Apple's 2 character day format and makes it into 3 characters
function two2threeCharDays($day) {
if ($day == "SU") $day_longer = "sun";
elseif ($day == "MO") $day_longer = "mon";
elseif ($day == "TU") $day_longer = "tue";
elseif ($day == "WE") $day_longer = "wed";
elseif ($day == "TH") $day_longer = "thu";
elseif ($day == "FR") $day_longer = "fri";
elseif ($day == "SA") $day_longer = "sat";
return $day_longer;
}
// dateOfWeek() takes a date in Ymd and a day of week in 3 letters or more
// and returns the date of that day. (ie: "sun" or "sunday" would be acceptable values of $day but not "su")
function dateOfWeek($Ymd, $day) {
global $week_start_day;
if (!$week_start_day) $week_start_day = "Sunday";
$timestamp = strtotime($Ymd);
$num = date("w", strtotime($week_start_day));
$start_day_time = strtotime((date("w",$timestamp)==$num ? "$week_start_day" : "last $week_start_day"), $timestamp);
return date("Ymd",strtotime($day,$start_day_time));
}
// function to compare to dates in Ymd and return the number of weeks
// that differ between them. requires dateOfWeek()
function weekCompare($now, $then) {
global $week_start_day;
$sun_now = dateOfWeek($now, $week_start_day);
$sun_then = dateOfWeek($then, $week_start_day);
$seconds_now = strtotime($sun_now);
$seconds_then = strtotime($sun_then);
$diff_seconds = $seconds_now - $seconds_then;
$diff_minutes = $diff_seconds/60;
$diff_hours = $diff_minutes/60;
$diff_days = round($diff_hours/24);
$diff_weeks = $diff_days/7;
return $diff_weeks;
}
// function to compare to dates in Ymd and return the number of days
// that differ between them.
function dayCompare($now, $then) {
$seconds_now = strtotime($now);
$seconds_then = strtotime($then);
$diff_seconds = $seconds_now - $seconds_then;
$diff_minutes = $diff_seconds/60;
$diff_hours = $diff_minutes/60;
$diff_days = round($diff_hours/24);
return $diff_days;
}
// function to compare to dates in Ymd and return the number of months
// that differ between them.
function monthCompare($now, $then) {
ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $now, $date_now);
ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $then, $date_then);
$diff_years = $date_now[1] - $date_then[1];
$diff_months = $date_now[2] - $date_then[2];
if ($date_now[2] < $date_then[2]) {
$diff_years -= 1;
$diff_months = ($diff_months + 12) % 12;
}
$diff_months = ($diff_years * 12) + $diff_months;
return $diff_months;
}
function yearCompare($now, $then) {
ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $now, $date_now);
ereg ("([0-9]{4})([0-9]{2})([0-9]{2})", $then, $date_then);
$diff_years = $date_now[1] - $date_then[1];
return $diff_years;
}
// localizeDate() - similar to strftime but uses our preset arrays of localized
// months and week days and only supports %A, %a, %B, %b, %e, and %Y
// more can be added as needed but trying to keep it small while we can
function localizeDate($format, $timestamp) {
global $daysofweek_lang, $daysofweekshort_lang, $daysofweekreallyshort_lang, $monthsofyear_lang, $monthsofyear_lang, $monthsofyearshort_lang;
$year = date("Y", $timestamp);
$month = date("n", $timestamp)-1;
$day = date("j", $timestamp);
$dayofweek = date("w", $timestamp);
$date = str_replace('%Y', $year, $format);
$date = str_replace('%e', $day, $date);
$date = str_replace('%B', $monthsofyear_lang[$month], $date);
$date = str_replace('%b', $monthsofyearshort_lang[$month], $date);
$date = str_replace('%A', $daysofweek_lang[$dayofweek], $date);
$date = str_replace('%a', $daysofweekshort_lang[$dayofweek], $date);
return $date;
}
?>
\ No newline at end of file diff --git a/functions/list_months.php b/functions/list_months.php index f3fbb4a..a1ef122 100644 --- a/functions/list_months.php +++ b/functions/list_months.php @@ -8,7 +8,7 @@ $getdate_month = date("m", strtotime($getdate)); for ($i=0; $i<12; $i++) { $monthdate = date ("Ymd", $month_time); $month_month = date("m", $month_time); - $select_month = strftime($dateFormat_month, $month_time); + $select_month = localizeDate($dateFormat_month, $month_time); if ($month_month == $getdate_month) { print "<option value=\"month.php?cal=$cal&getdate=$monthdate\" selected>$select_month</option>\n"; } else { diff --git a/functions/list_weeks.php b/functions/list_weeks.php index 58d1465..ead91e8 100644 --- a/functions/list_weeks.php +++ b/functions/list_weeks.php @@ -16,8 +16,8 @@ print "<form>\n<select name=\"action\" class=\"query_style\" onChange=\"window.l // build the <option> tags do { $weekdate = date ("Ymd", $start_week_time); - $select_week1 = strftime($dateFormat_week_jump, $start_week_time); - $select_week2 = strftime($dateFormat_week_jump, $end_week_time); + $select_week1 = localizeDate($dateFormat_week_jump, $start_week_time); + $select_week2 = localizeDate($dateFormat_week_jump, $end_week_time); if (($check_week >= $start_week_time) && ($check_week <= $end_week_time)) { print "<option value=\"week.php?cal=$cal&getdate=$weekdate\" selected>$select_week1 - $select_week2</option>\n"; diff --git a/languages/danish.inc.php b/languages/danish.inc.php index aa061c0..cd81e65 100644 --- a/languages/danish.inc.php +++ b/languages/danish.inc.php @@ -32,8 +32,29 @@ $event_end_lang = "Slut Tidspunkt"; $this_months_lang = "Denne Måneds Aftaler"; $date_lang = "Dato"; $summary_lang = "Opsummering"; + +// new since last translation $all_day_lang = "All day event"; $notes_lang = "Notes"; +$this_years_lang = "This Year's Events"; +$today_lang = "Today"; +$this_week_lang = "This Week"; +$this_month_lang = "This Month"; +$jump_lang = "Jump to"; +$tomorrows_lang = "Tomorrow's Events"; +$goday_lang = "Go to Today"; +$goweek_lang = "Go to This Week"; +$gomonth_lang = "Go to This Month"; +$goyear_lang = "Go to This Year"; + +// Date display since setlocale isnt perfect. +$daysofweek_lang = array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); +$daysofweekshort_lang = array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); +$daysofweekreallyshort_lang = array ("S","M","T","W","T","F","S"); +$monthsofyear_lang = array ("January","February","March","April","May","June","July","August","September","October","November","December"); +$monthsofyearshort_lang = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); + + // Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php setlocale (LC_TIME, 'dk_DK'); @@ -41,11 +62,28 @@ setlocale (LC_TIME, 'dk_DK'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = "H:i"; -// For date formatting, cehck out: http://www.php.net/manual/en/function.strftime.php +// For date formatting, see note below $dateFormat_day = "%A, %B %e"; $dateFormat_week = "%B %e"; $dateFormat_week_list = "%a, %b %e"; +$dateFormat_week_jump = "%b %e"; // new since last translation $dateFormat_month = "%B %Y"; $dateFormat_month_list = "%A, %e %B"; +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ + ?>
\ No newline at end of file diff --git a/languages/dutch.inc.php b/languages/dutch.inc.php index 0be2327..6d61fea 100644 --- a/languages/dutch.inc.php +++ b/languages/dutch.inc.php @@ -32,8 +32,29 @@ $event_end_lang = "Eind Tijd"; $this_months_lang = "Activiteiten Deze Maand"; $date_lang = "Datum"; $summary_lang = "Overzicht"; + +// new since last translation $all_day_lang = "All day event"; $notes_lang = "Notes"; +$this_years_lang = "This Year's Events"; +$today_lang = "Today"; +$this_week_lang = "This Week"; +$this_month_lang = "This Month"; +$jump_lang = "Jump to"; +$tomorrows_lang = "Tomorrow's Events"; +$goday_lang = "Go to Today"; +$goweek_lang = "Go to This Week"; +$gomonth_lang = "Go to This Month"; +$goyear_lang = "Go to This Year"; + +// Date display since setlocale isnt perfect. // new since last translation +$daysofweek_lang = array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); +$daysofweekshort_lang = array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); +$daysofweekreallyshort_lang = array ("S","M","T","W","T","F","S"); +$monthsofyear_lang = array ("January","February","March","April","May","June","July","August","September","October","November","December"); +$monthsofyearshort_lang = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); + + // Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php setlocale (LC_TIME, 'nl_BE'); @@ -41,12 +62,28 @@ setlocale (LC_TIME, 'nl_BE'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = "G:i"; -// For date formatting, check out: http://www.php.net/manual/en/function.strftime.php +// For date formatting, see note below $dateFormat_day = "%A %e %B"; $dateFormat_week = "%e %B"; $dateFormat_week_list = "%a %e %b"; +$dateFormat_week_jump = "%b %e";// new since last translation $dateFormat_month = "%B %Y"; $dateFormat_month_list = "%A %e %B"; +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ ?>
\ No newline at end of file diff --git a/languages/english.inc.php b/languages/english.inc.php index 904ce4a..8635571 100644 --- a/languages/english.inc.php +++ b/languages/english.inc.php @@ -48,6 +48,7 @@ $goyear_lang = "Go to This Year"; // Date display since setlocale isnt perfect. $daysofweek_lang = array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); $daysofweekshort_lang = array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); +$daysofweekreallyshort_lang = array ("S","M","T","W","T","F","S"); $monthsofyear_lang = array ("January","February","March","April","May","June","July","August","September","October","November","December"); $monthsofyearshort_lang = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); @@ -58,7 +59,7 @@ setlocale (LC_TIME, 'en_EN'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = "g:i A"; -// For date formatting, check out: http://www.php.net/manual/en/function.strftime.php +// For date formatting, see note below $dateFormat_day = "%A, %B %e"; $dateFormat_week = "%B %e"; $dateFormat_week_list = "%a, %b %e"; @@ -66,4 +67,20 @@ $dateFormat_week_jump = "%b %e"; $dateFormat_month = "%B %Y"; $dateFormat_month_list = "%A, %B %e"; +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ + ?>
\ No newline at end of file diff --git a/languages/french.inc.php b/languages/french.inc.php index 6f6c3b2..c301517 100644 --- a/languages/french.inc.php +++ b/languages/french.inc.php @@ -32,8 +32,29 @@ $event_end_lang = "Fin"; $this_months_lang = "Événements de ce mois"; $date_lang = "Date"; $summary_lang = "Résumé"; + +// new since last translation $all_day_lang = "All day event"; $notes_lang = "Notes"; +$this_years_lang = "This Year's Events"; +$today_lang = "Today"; +$this_week_lang = "This Week"; +$this_month_lang = "This Month"; +$jump_lang = "Jump to"; +$tomorrows_lang = "Tomorrow's Events"; +$goday_lang = "Go to Today"; +$goweek_lang = "Go to This Week"; +$gomonth_lang = "Go to This Month"; +$goyear_lang = "Go to This Year"; + +// Date display since setlocale isnt perfect. // new since last translation +$daysofweek_lang = array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); +$daysofweekshort_lang = array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); +$daysofweekreallyshort_lang = array ("S","M","T","W","T","F","S"); +$monthsofyear_lang = array ("January","February","March","April","May","June","July","August","September","October","November","December"); +$monthsofyearshort_lang = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); + + // Set Location for date formatting, check out: http://www.php.net/manual/fr/function.setlocale.php setlocale (LC_TIME,"fr_FR"); @@ -41,11 +62,28 @@ setlocale (LC_TIME,"fr_FR"); // For time formatting, check out: http://www.php.net/manual/fr/function.date.php $timeFormat = "H:i"; -// For date formatting, check out: http://www.php.net/manual/fr/function.strftime.php +// For date formatting, see note below $dateFormat_day = "%A %e %B"; $dateFormat_week = "%e %B"; $dateFormat_week_list = "%a %e %b"; +$dateFormat_week_jump = "%b %e";// new since last translation $dateFormat_month = "%B %Y"; $dateFormat_month_list = "%A %e %B"; +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ + ?> diff --git a/languages/german.inc.php b/languages/german.inc.php index f5b677b..867711d 100644 --- a/languages/german.inc.php +++ b/languages/german.inc.php @@ -31,8 +31,27 @@ $event_end_lang = "Ende"; $this_months_lang = "Alle Einträge in diesem Monat"; $date_lang = "Datum"; $summary_lang = "Beschreibung"; + +// new since last translation $all_day_lang = "All day event"; $notes_lang = "Notes"; +$this_years_lang = "This Year's Events"; +$today_lang = "Today"; +$this_week_lang = "This Week"; +$this_month_lang = "This Month"; +$jump_lang = "Jump to"; +$tomorrows_lang = "Tomorrow's Events"; +$goday_lang = "Go to Today"; +$goweek_lang = "Go to This Week"; +$gomonth_lang = "Go to This Month"; +$goyear_lang = "Go to This Year"; + +// Date display since setlocale isnt perfect. // new since last translation +$daysofweek_lang = array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); +$daysofweekshort_lang = array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); +$daysofweekreallyshort_lang = array ("S","M","T","W","T","F","S"); +$monthsofyear_lang = array ("January","February","March","April","May","June","July","August","September","October","November","December"); +$monthsofyearshort_lang = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); // Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php // for Switzerland @@ -45,12 +64,29 @@ setlocale (LC_TIME, 'ch_DE'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = "H:i"; -// For date formatting, check out: http://www.php.net/manual/en/function.strftime.php +// For date formatting, see note below $dateFormat_day = "%A, %e. %B"; $dateFormat_week = "%B %e"; $dateFormat_week_list = "%a, %e. %b"; +$dateFormat_week_jump = "%b %e";// new since last translation $dateFormat_month = "%B %Y"; $dateFormat_month_list = "%A, %e. %B"; +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ + ?>
\ No newline at end of file diff --git a/languages/italian.inc.php b/languages/italian.inc.php index c6c17d5..edf9f7a 100644 --- a/languages/italian.inc.php +++ b/languages/italian.inc.php @@ -32,8 +32,28 @@ $event_end_lang = "Fine"; $this_months_lang = "Eventi di questo mese"; $date_lang = "Data"; $summary_lang = "Sommario"; + +// new since last translation $all_day_lang = "All day event"; $notes_lang = "Notes"; +$this_years_lang = "This Year's Events"; +$today_lang = "Today"; +$this_week_lang = "This Week"; +$this_month_lang = "This Month"; +$jump_lang = "Jump to"; +$tomorrows_lang = "Tomorrow's Events"; +$goday_lang = "Go to Today"; +$goweek_lang = "Go to This Week"; +$gomonth_lang = "Go to This Month"; +$goyear_lang = "Go to This Year"; + +// Date display since setlocale isnt perfect. // new since last translation +$daysofweek_lang = array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); +$daysofweekshort_lang = array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); +$daysofweekreallyshort_lang = array ("S","M","T","W","T","F","S"); +$monthsofyear_lang = array ("January","February","March","April","May","June","July","August","September","October","November","December"); +$monthsofyearshort_lang = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); + // Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php setlocale (LC_TIME, 'it_IT'); @@ -41,11 +61,28 @@ setlocale (LC_TIME, 'it_IT'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = "G:i"; -// For date formatting, cehck out: http://www.php.net/manual/en/function.strftime.php +// For date formatting, see note below $dateFormat_day = "%A, %e %B"; $dateFormat_week = "%e %B"; $dateFormat_week_list = "%a, %e %b"; +$dateFormat_week_jump = "%b %e";// new since last translation $dateFormat_month = "%B %Y"; $dateFormat_month_list = "%A, %e %B"; +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ + ?>
\ No newline at end of file diff --git a/languages/japanese.inc.php b/languages/japanese.inc.php index 4c8b6e7..2f212b8 100644 --- a/languages/japanese.inc.php +++ b/languages/japanese.inc.php @@ -46,17 +46,47 @@ $this_week_lang = "今週"; $this_month_lang = "今月"; $this_year_lang = "今年"; +$jump_lang = "Jump to"; +$tomorrows_lang = "Tomorrow's Events"; +$goday_lang = "Go to Today"; +$goweek_lang = "Go to This Week"; +$gomonth_lang = "Go to This Month"; +$goyear_lang = "Go to This Year"; + +$daysofweek_lang = array ("日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"); +$daysofweekshort_lang = array ("日曜","月曜","火曜","水曜","木曜","金曜","土曜"); +$daysofweekreallyshort_lang = array ("日","月","火","水","木","金","土"); +$monthsofyear_lang = array ("1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"); +$monthsofyearshort_lang = $monthsofyear_lang; + // Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php setlocale (LC_TIME, 'ja_JP'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php -$timeFormat = "g:iA"; - -// For date formatting, cehck out: http://www.php.net/manual/en/function.strftime.php -$dateFormat_day = "%B %e %A"; -$dateFormat_week = "%B %e"; -$dateFormat_week_list = "%b %e %a"; -$dateFormat_month = "%Y %B"; -$dateFormat_month_list = "%B %e %A"; +$timeFormat = "g:i A"; + +// For date formatting, see note below +$dateFormat_day = "%B %e日 %A"; +$dateFormat_week = "%B %e日"; +$dateFormat_week_list = "%b %e日 %a"; +$dateFormat_week_jump = "%b %e日"; +$dateFormat_month = "%Y年 %B"; +$dateFormat_month_list = "%B %e日 %A"; + +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ ?>
\ No newline at end of file diff --git a/languages/norwegian.inc.php b/languages/norwegian.inc.php index 8c2ab4a..557e00b 100644 --- a/languages/norwegian.inc.php +++ b/languages/norwegian.inc.php @@ -35,17 +35,54 @@ $summary_lang = "Sammendrag"; $all_day_lang = "Hele dagen"; $notes_lang = "Notater"; +// new since last translation +$this_years_lang = "This Year's Events"; +$today_lang = "Today"; +$this_week_lang = "This Week"; +$this_month_lang = "This Month"; +$jump_lang = "Jump to"; +$tomorrows_lang = "Tomorrow's Events"; +$goday_lang = "Go to Today"; +$goweek_lang = "Go to This Week"; +$gomonth_lang = "Go to This Month"; +$goyear_lang = "Go to This Year"; + +// Date display since setlocale isnt perfect. // new since last translation +$daysofweek_lang = array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); +$daysofweekshort_lang = array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); +$daysofweekreallyshort_lang = array ("S","M","T","W","T","F","S"); +$monthsofyear_lang = array ("January","February","March","April","May","June","July","August","September","October","November","December"); +$monthsofyearshort_lang = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); + + // Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php setlocale (LC_TIME, 'no_NO'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = "H:i"; -// For date formatting, check out: http://www.php.net/manual/en/function.strftime.php +// For date formatting, see note below $dateFormat_day = "%A, %e. %B "; $dateFormat_week = "%e. %B"; $dateFormat_week_list = "%a, %e. %b"; +$dateFormat_week_jump = "%b %e"; // new since last translation $dateFormat_month = "%B %Y"; $dateFormat_month_list = "%A, %e. %B"; +/* +Notes about dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ + ?>
\ No newline at end of file diff --git a/languages/polish.inc.php b/languages/polish.inc.php index 7e2743a..bcfe001 100644 --- a/languages/polish.inc.php +++ b/languages/polish.inc.php @@ -32,8 +32,28 @@ $event_end_lang = "Koniec"; $this_months_lang = "Zadania miesiąca"; $date_lang = "Data"; $summary_lang = "Info"; + +// new since last translation $all_day_lang = "All day event"; $notes_lang = "Notes"; +$this_years_lang = "This Year's Events"; +$today_lang = "Today"; +$this_week_lang = "This Week"; +$this_month_lang = "This Month"; +$jump_lang = "Jump to"; +$tomorrows_lang = "Tomorrow's Events"; +$goday_lang = "Go to Today"; +$goweek_lang = "Go to This Week"; +$gomonth_lang = "Go to This Month"; +$goyear_lang = "Go to This Year"; + +// Date display since setlocale isnt perfect. +$daysofweek_lang = array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"); +$daysofweekshort_lang = array ("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); +$daysofweekreallyshort_lang = array ("S","M","T","W","T","F","S"); +$monthsofyear_lang = array ("January","February","March","April","May","June","July","August","September","October","November","December"); +$monthsofyearshort_lang = array ("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); + // Set Location for date formatting, check out: http://www.php.net/manual/en/function.setlocale.php setlocale (LC_TIME, 'pl_PL'); @@ -41,11 +61,28 @@ setlocale (LC_TIME, 'pl_PL'); // For time formatting, check out: http://www.php.net/manual/en/function.date.php $timeFormat = "G:i"; -// For date formatting, cehck out: http://www.php.net/manual/en/function.strftime.php +// For date formatting, see note below $dateFormat_day = "%A, %e %B"; $dateFormat_week = "%e %B"; $dateFormat_week_list = "%a, %e %b"; +$dateFormat_week_jump = "%b %e";// new since last translation $dateFormat_month = "%B %Y"; $dateFormat_month_list = "%A, %e %B"; +/* +Notes about $dateFormat_* + The pieces are similar to that of the PHP function strftime(), + however only the following is supported at this time: + + %A - the full week day name as specified in $daysofweek_lang + %a - the shortened week day name as specified in $daysofweekshort_lang + %B - the full month name as specified in $monthsofyear_lang + %b - the shortened month name as specified in $monthsofyearshort_lang + %e - the day of the month as a decimal number (1 to 31) + %Y - the 4-digit year + + If this causes problems with representing your language accurately, let + us know. We will be happy to modify this if needed. +*/ + ?>
\ No newline at end of file @@ -18,10 +18,10 @@ $date = mktime(0,0,0,"$this_month","$this_day","$this_year"); $next_month = date("Ymd", DateAdd ("m", "1", $date)); $prev_month = date("Ymd", DateAdd ("m", "-1", $date)); - $display_month = strftime ($dateFormat_month, $date); + $display_month = localizeDate ($dateFormat_month, $date); $parse_month = date ("Ym", $date); $first_sunday = sundayOfWeek($this_year, $this_month, "1"); - $thisday2 = strftime($dateFormat_week_list, $unix_time); + $thisday2 = localizeDate($dateFormat_week_list, $unix_time); ?> diff --git a/month_bottom.php b/month_bottom.php index 6bcfa29..f192775 100644 --- a/month_bottom.php +++ b/month_bottom.php @@ -11,7 +11,7 @@ <table border="0" width="737" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" class="calborder"> <tr> <td align="left" valign="top" width="1%" class="sideback"><?php echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$prev_month\"><img src=\"styles/$style_sheet/left_arrows.gif\" alt=\"right\" width=\"16\" height=\"20\" border=\"0\" align=\"left\"></a>"; ?></td> - <td align="center" class="sideback"><font class="G10B"><b><?php print (strftime ($dateFormat_day, strtotime($getdate))); ?></b></font></td> + <td align="center" class="sideback"><font class="G10B"><b><?php print (localizeDate ($dateFormat_day, strtotime($getdate))); ?></b></font></td> <td align="right" valign="top" width="1%" class="sideback"><?php echo "<a class=\"psf\" href=\"month.php?cal=$cal&getdate=$next_month\"><img src=\"styles/$style_sheet/right_arrows.gif\" alt=\"right\" width=\"16\" height=\"20\" border=\"0\" align=\"right\"></a>"; ?></td> </tr> <tr> @@ -25,7 +25,7 @@ <table width="160" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign="top" width="1"><img src="images/spacer.gif" width="1" height="20"></td> - <td align="center" class="G10B"><b><?php print (strftime ($dateFormat_month, strtotime("-1 month", strtotime($getdate)))); ?></b></td> + <td align="center" class="G10B"><b><?php print (localizeDate ($dateFormat_month, strtotime("-1 month", strtotime($getdate)))); ?></b></td> <td align="right" valign="top" width="1"></td> </tr> <tr> @@ -231,7 +231,7 @@ <table width="160" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="left" valign="top" width="1"><img src="images/spacer.gif" width="1" height="20"></td> - <td align="center" class="G10B"><b><?php print (strftime ($dateFormat_month, strtotime("+1 month", strtotime($getdate)))); ?></b></td> + <td align="center" class="G10B"><b><?php print (localizeDate ($dateFormat_month, strtotime("+1 month", strtotime($getdate)))); ?></b></td> <td align="right" valign="top" width="1"></td> </tr> <tr> diff --git a/sidebar.php b/sidebar.php index 6c7c1e3..c0dd39d 100644 --- a/sidebar.php +++ b/sidebar.php @@ -204,8 +204,9 @@ <td valign="center" align="center"> <table width="160" border="0" cellpadding="0" cellspacing="0" class="calborder"> <tr> + <td align="left" valign="top" width="1" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> - <td align="center" class="sideback"><b><font class="G10B"><?php print (strftime ($dateFormat_month, strtotime("-1 month", strtotime($getdate)))); ?></b></font></td> + <td align="center" class="sideback"><b><font class="G10B"><?php print (localizeDate ($dateFormat_month, strtotime("-1 month", strtotime($getdate)))); ?></b></font></td> <td align="right" valign="top" width="1" class="sideback"></td> </tr> <tr> @@ -224,7 +225,8 @@ <?php $start_day = strtotime($week_start_day); for ($i=0; $i<7; $i++) { - $day = substr(date("D", $start_day), 0, 2); + $day_num = date("w", $start_day); + $day = $daysofweekreallyshort_lang[$day_num]; print "<td align=\"center\" class=\"G10B\"><b>$day</b></td>\n"; $start_day = ($start_day + (24.5 * 60 * 60)); } @@ -284,7 +286,7 @@ <table width="160" border="0" cellpadding="0" cellspacing="0" class="calborder"> <tr> <td align="left" valign="top" width="1" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> - <td align="center" class="sideback"><font class="G10B"><b><?php print (strftime ($dateFormat_month, strtotime($getdate))); ?></b></font></td> + <td align="center" class="sideback"><font class="G10B"><b><?php print (localizeDate ($dateFormat_month, strtotime($getdate))); ?></b></font></td> <td align="right" valign="top" width="1" class="sideback"></td> </tr> <tr> @@ -303,7 +305,8 @@ <?php $start_day = strtotime($week_start_day); for ($i=0; $i<7; $i++) { - $day = substr(date("D", $start_day), 0, 2); + $day_num = date("w", $start_day); + $day = $daysofweekreallyshort_lang[$day_num]; print "<td align=\"center\" class=\"G10B\"><b>$day</b></td>\n"; $start_day = ($start_day + (24.5 * 60 * 60)); } @@ -363,7 +366,7 @@ <table width="160" border="0" cellpadding="0" cellspacing="0" class="calborder"> <tr> <td align="left" valign="top" width="1" class="sideback"><img src="images/spacer.gif" width="1" height="20"></td> - <td align="center" class="sideback"><font class="G10B"><b><?php print (strftime ($dateFormat_month, strtotime("+1 month", strtotime($getdate)))); ?></b></font></td> + <td align="center" class="sideback"><font class="G10B"><b><?php print (localizeDate ($dateFormat_month, strtotime("+1 month", strtotime($getdate)))); ?></b></font></td> <td align="right" valign="top" width="1" class="sideback"></td> </tr> <tr> @@ -382,7 +385,8 @@ <?php $start_day = strtotime($week_start_day); for ($i=0; $i<7; $i++) { - $day = substr(date("D", $start_day), 0, 2); + $day_num = date("w", $start_day); + $day = $daysofweekreallyshort_lang[$day_num]; print "<td align=\"center\" class=\"G10B\"><b>$day</b></td>\n"; $start_day = ($start_day + (24.5 * 60 * 60)); } @@ -23,8 +23,8 @@ $yesterdays_date = date( "Ymd", strtotime("-1 day", $unix_time)); $start_week_time = strtotime(dateOfWeek($getdate, $week_start_day)); $end_week_time = $start_week_time + (6 * 25 * 60 * 60); -$start_week = strftime($dateFormat_week, $start_week_time); -$end_week = strftime($dateFormat_week, $end_week_time); +$start_week = localizeDate($dateFormat_week, $start_week_time); +$end_week = localizeDate($dateFormat_week, $end_week_time); $display_date = "$start_week - $end_week"; @@ -108,7 +108,7 @@ for ($i=0;$i<7;$i++) { echo "<td bgcolor=\"#eeeeee\" width=\"1\"></td>"; do { $thisday = date("Ymd", $thisdate); - $thisday2 = strftime($dateFormat_week_list, $thisdate); + $thisday2 = localizeDate($dateFormat_week_list, $thisdate); echo "<td width=\"70\" colspan=\"" . $nbrGridCols[$thisday] . "\" valign=\"top\" align=\"center\" bgcolor=\"#eeeeee\" class=\"V9\">\n"; echo "<a class=\"psf\" href=\"day.php?cal=$cal&getdate=$thisday\">$thisday2</a>\n"; echo "</td>\n"; |