48 function smarty_modifier_localize_date($date, $lang) {
50 $message = ObjectFactory::getInstance(
'message');
51 $names = [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday",
52 "January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
54 foreach ($names as $name) {
55 $localizeName = $message->getText($name,
null, $lang);
56 $localizeShortName = substr($localizeName, 0, 3);
57 $date = strtr($date, [$name => $localizeName, substr($name, 0, 3) => $localizeShortName]);
ObjectFactory implements the service locator pattern by wrapping a Factory instance and providing sta...