Jump to content

Recommended Posts

Posted (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 by paulo
Posted
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

 

What is your website addy -- I will look at it for you..

Posted
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.  :dance:

 

Thanks

 

What is your website addy -- I will look at it for you..

 

I obtained modifying the archive mainfile.php

Posted

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. :tchrocks:

 

Bill, thank´s for its interest.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...