0

I currently use the following code to display some date inside my Magento store:

setlocale(LC_TIME, 'nl_NL'); 
$today = new Zend_Date($_product->getData('delivery_eta'), 'MM-dd-yyyy'); 
$date = Mage::helper('core')->formatDate($today, Mage_Core_Model_Locale::FORMAT_TYPE_FULL, false); 
echo $date; 

But when a for example Google Chrome visitor with a specific language goes to the website, this is translated to their language. I want to disable this and display the date always in Dutch.

How can I fix this?

I already tried to add the line setlocale(LC_TIME, 'nl_NL'); and setlocale(LC_ALL, 'nl_NL'); but that does not work. It is still translated. How can I fix this?

0

1 Answer 1

2

Please try this ...

$locale = 'nl_NL';
$date = new Zend_Date($_product->getData('delivery_eta'));
$date->setLocale($locale);
echo $date->toString(Zend_Date::DATE_LONG);
2

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