将日期翻译成西班牙语Wordpress


Translating date into spanish Wordpress

我在Wordpress上有以下网站,在那里你可以用英语找到不同的月份时间表,我需要把它改成西班牙语:

http://comproautosusados.com/centrolerner2016/horarios/

我尝试了Loco Translate,尝试编辑.pó文件,现在我正在查看主题的php文件。我已经能翻译很多东西了,但我几个月都不能翻译。例如,你可以在表格的左侧看到"Lunes 28th April"。我需要把它改成"Lunes 28 Abril"。

在主题的"核心"中有一个文件:timetable.php,其中可以找到这个函数:

public function getDays() {
if (!isset(self::$cache['days'])) {
$days = array();
foreach ($this->get('calendar.period') as $time) {
$object = new VTCore_Wordpress_Objects_Array(array(
'id' => strtolower($time->format('l')),
'timestamp' => $time->getTimeStamp(),
'formatted' => $time->format($this->get('calendar.format')),
'iso' => $time->format('Y-m-d'TH:i:sO'),
'label' => $this->get('days.' . strtolower($time->format('l'))),
));
$days[] = $object;
}
self::$cache['days'] = $days;
}
return self::$cache['days'];
}

主题在哪里生成日期?我不知道该怎么办。

我也遇到过同样的问题,也许这样的事情会对你有所帮助:

<?php
// Get the numeric representation of the current month
$m = date('n');
// Get a full textual representation of the month ( in norwegian )
if ($m==1)  { $t = "Januar"; }
if ($m==2)  { $t = "Februar"; }
if ($m==3)  { $t = "Mars"; }
if ($m==4)  { $t = "April"; }
if ($m==5)  { $t = "Mai"; }
if ($m==6)  { $t = "Juni"; }
if ($m==7)  { $t = "Juli"; }
if ($m==8)  { $t = "August"; }
if ($m==9)  { $t = "September"; }
if ($m==10) { $t = "Oktober"; }
if ($m==11) { $t = "November"; }
if ($m==12) { $t = "Desember"; }
// Display the date
echo date('m').".".$t.".".date('Y'); // returns: 05.Mai.2016
?>