如何改变“语言”.即将到来的日期美元!”在给网站用户的提醒邮件中


How to change the language of ".$upcoming date." in reminder emails to site users

我迫切需要知道如何在通过cron任务发送给用户的提醒邮件中以西班牙语而不是英语显示日期。对于当前的(".$upcoming_date."),邮件中显示的日期是这样的:Saturday, 26 November, 2011 21:19,我需要将其更改为相应的西班牙语版本或26/11/2011 21:19

如果时间存储在某个地方,您可能需要这个函数来转换时间。祝你好运。http://php.net/manual/en/function.strtotime.php

http://php.net/manual/en/function.date.php

$today = date("F j, Y, g:i a");                 // March 10, 2001, 5:16 pm
$today = date("m.d.y");                         // 03.10.01
$today = date("j, n, Y");                       // 10, 3, 2001
$today = date("Ymd");                           // 20010310
$today = date('h-i-s, j-m-y, it is w Day');     // 05-16-18, 10-03-01, 1631 1618 6Satpm01
$today = date(''i't 'i's 't'h'e jS 'd'a'y.');   // it is the 10th day.
$today = date("D M j G:i:s T Y");               // Sat Mar 10 17:16:18 MST 2001
$today = date('H:m:s 'm 'i's' 'm'o'n't'h');     // 17:03:18 m is month
$today = date("H:i:s");                         // 17:16:18

你没有。您更改传递给strftime()$format参数的值。

strftime(_($someformat), $sometime)

对于西班牙日期,您可以执行:

<>之前回声strftime("% % e·德·Y % B del % - % H: % M: % S",mktime(函数(H)、函数("我"),函数("S")-16200年,函数("n"),函数("j"),函数(" Y ")));之前

希望有所帮助