Lucas B Lucas B - 1 year ago 117
PHP Question

Translate date("d F Y (H:i) function php

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

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

Output: 16 January 2013 (00:54)

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

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

Answer Source

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


echo date_i18n("d F Y (H:i)",$date) ;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download