Magento 1.9 – How to Translate $date into Dutch

datelanguagemagento-1.9

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

<?php
$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?

Best Answer

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

Related Topic