I thought it would be pretty easy, but it is not! I have a date: mei 28, 2015 (Dutch) and I would like to translate it into English Ymd
The problem is that the site is multilingual, so I would like it to remain dynamic (replace May with May), this is not a solution, I already tried:
setlocale(LC_TIME, 'NL_nl');
setlocale(LC_ALL, 'nl_NL');
echo strftime("%Y-%m-%d", strtotime($value));
or
$date = date_parse(($value));
print_r($date);
but all the time I get: 1970-01-01
any ideas?
I am trying to achieve this in magento, so maybe there is a magento function for this
source
share