I want to translate the displayed date into Dutch. My current code looks like this:

$post = $this->getPost();
$date = Mage::getModel('core/date');

<span class="date"><?php echo $date->date('d F Y', $post->getCreatedTime()); ?></span>

But that does display the date as 07 March 2016. I want to translate the Month to Dutch, so it will be 7 Maart 2016.

How can I achieve that?

2 Answers 2


Mage_Core_Helper_Data::format() it will format the date according to the locale settings.

Mage::helper('core')->formatDate($date->date('d F Y', $post->getCreatedTime()), 'medium', false);

reference for understanding the date better

  • 1
    That's maybe a better/more Magento solution.
    – Niels
    Mar 7, 2016 at 11:11

You can do this by setting the locale to Dutch:

setlocale(LC_TIME, 'NL_nl');


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.