翻译date(” d F Y(H:i)函数php [英] Translate date("d F Y (H:i) function php

查看:99
本文介绍了翻译date(” d F Y(H:i)函数php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是巴西人,并且有一个使用

I'm brazilian and there's a wordpress plugin that uses

" . date("d F Y (H:i)",$date) . "

输出: 2013年1月16日(00:54)

但这应该是16 Janeiro 2013(00:54),葡萄牙语...我该如何更改?

But it should be 16 Janeiro 2013 (00:54), in portuguese... How can I change it?

PS:我认为日期可能是由插件创建者提供的外部文件设置的:p我不确定

PS: I think maybe the date is set by an external file provided by the plugin creator :p I'm not sure though

推荐答案

WordPress具有 date_i18n 可以根据时间戳以本地化格式检索日期。

WordPress has date_i18n to retrieve the date in localized format, based on timestamp.

尝试:

echo date_i18n("d F Y (H:i)",$date) ;

这篇关于翻译date(” d F Y(H:i)函数php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆