Prel Posted June 18, 2005 Posted June 18, 2005 (edited) Hello, As to change the days of the week of English for another language? Already I changed in Admin Preferences for the language that desire but the days of the week in the News and the Calendar it continues in English. Thanks Edited June 18, 2005 by paulo Quote
Tommy Posted June 19, 2005 Posted June 19, 2005 Hello, As to change the days of the week of English for another language? Already I changed in Admin Preferences for the language that desire but the days of the week in the News and the Calendar it continues in English. Thanks <{POST_SNAPBACK}> What is your website addy -- I will look at it for you.. Quote
Prel Posted June 20, 2005 Author Posted June 20, 2005 Hello, As to change the days of the week of English for another language? Already I changed in Admin Preferences for the language that desire but the days of the week in the News and the Calendar it continues in English. Thanks <{POST_SNAPBACK}> What is your website addy -- I will look at it for you.. <{POST_SNAPBACK}> I obtained modifying the archive mainfile.php Quote
Prel Posted June 21, 2005 Author Posted June 21, 2005 Hi Bill, Everything ok. This is the solution: It locates these lines of code in its archive file mainfile.php : (in line 673) >function formatTimestamp($time) { global $datetime, $locale; setlocale (LC_TIME, "$locale"); ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $datetime = strftime(""._DATESTRING."", mktime($datetime[4],$datetime[5],$datetime[6],$datetime[2],$datetime[3],$datetime[1])); $datetime = ucfirst($datetime); return($datetime);} and change for these[/i]: (in mine case days in Portuguese) >function formatTimestamp($time){ global $datetime, $locale; $dias_semana = array ("0" => "Domingo", "1" => "Segunda-feira", "2" => "Terça-feira", "3" => "Quarta-feira", "4" => "Quinta-feira", "5" => "Sexta-feira", "6" => "Sábado"); $meses_ano = array ("1" => "Janeiro", "2" => "Fevereiro", "3" => "Março", "4" => "Abril", "5" => "Maio", "6" => "Junho", "7" => "Julho", "8" => "Agosto", "9" => "Setembro", "10" => "Outubro", "11" => "Novembro", "12" => "Dezembro"); setlocale (LC_TIME, "$locale"); ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})", $time, $datetime); $ano=$datetime[1]+0; $mes=$datetime[2]+0; $dia=$datetime[3]+0; $hora=$datetime[4]+0; $min=$datetime[5]+0; $longitud=strlen($min); if ($longitud == 1) $min="0".$min; $segs=$datetime[6]+0; $longitud=strlen($segs); if ($longitud == 1) $segs="0".$segs; $quedia= strftime ("%w", mktime($hora,$min,$segs,$mes,$dia,$ano)); $quedia = $dias_semana[$quedia]; $mes = $meses_ano[$mes]; $datetime = "$quedia, $dia de $mes de $ano ($hora:$min:$segs)"; return($datetime); } and: To modify the date in "Old Articles" it makes the following one: It locates the following existing line in the archive of its block (block-Old_Articles.php): setlocale(LC_TIME, $locale); (in line 66) and change ?for setlocale(LC_TIME, 'pt_BR'); (or you country) Soon ! I wait that it is useful for somebody. Bill, thank´s for its interest. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.