编程语言
首页 > 编程语言> > php – 将月份名称更改为法语

php – 将月份名称更改为法语

作者:互联网

我有这个代码:

<?php 
  echo "'".$sgps_newsletter->getEmail()."' demande en ".date('d.M.Y', strtotime($sgps_newsletter->getCreatedAt())) 
?> 

但月份名称用英文表示.我该怎么做才能用法语展示它?我已将settings.yml默认文化更改为法语,但没有任何反应.

解决方法:

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

To format dates in other languages, you should use the 07001 and
07002 functions instead of date().

标签:symfony-1-4,php
来源: https://codeday.me/bug/20190917/1810220.html