Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Lietuviška data?

Parašė Mantas_· 2011 Bir. 26 19:06:46
#1

Sveiki, kaip padaryti kad rodytų lietuviška datą?


$newsdate = date("jS M y", $row["timestamp"]);


Nes dabar "Sun 26th Jun 2011 07:26 pm"

Parašė avice· 2011 Bir. 26 20:06:04
#2

http://www.cyberlords.lt/php/644...-data.html

Parašė SenasisUseris· 2011 Bir. 27 00:06:07
#3

Atidaryk maincore.php failą.

Surask funkciją:

// Format the date & time accordingly
function showdate($format, $val) {
global $settings;
if ($format == "shortdate" || $format == "longdate" || $format == "forumdate") {
return strftime($settings[$format], $val + ($settings['timeoffset']*3600));
} else {
return strftime($format, $val + ($settings['timeoffset'] * 3600));
}
}


Ją ištrink ir vietoj jos įdėk:

// Format the date & time accordingly
function ltdate($op) {
$rights = array("January" => "Sausio", "February" => "Vasario", "March" => "Kovo",
"April" => "Balandžio", "May" => "Gegužės", "June" => "Birželio", "July" => "Liepos",
"August" => "Rugpjūčio", "September" => "Rugsėjo", "October" => "Spalio",
"November" => "Lapkričio", "December" => "Gruodžio");
foreach($rights as $key=>$rightsg) $op = ereg_replace($key, $rightsg, $op);
return $op;
}

function showdate($format, $val) {
global $settings;
if ($format == "shortdate" || $format == "longdate" || $format == "forumdate") {
return ltdate(strftime($settings[$format], $val+($settings['timeoffset']*3600)));
} else {
return ltdate(strftime($format, $val+($settings['timeoffset']*3600)));
}
}