From f56fa1fc50484d99906a0a22e2931f9c1fe708b6 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Thu, 24 Nov 2011 16:54:42 +0000 Subject: improved i18n --- h-source/Application/Include/myFunctions.php | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) (limited to 'h-source/Application/Include/myFunctions.php') diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index 8c757e7..bb7aa5f 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -73,15 +73,26 @@ function titleForRedirect($title) function smartDate($uglyDate = null, $lang = 'en') { - switch ($lang) + if (strcmp($lang,'en')) { - case 'en': - $smDate = date('H:i, d F Y',strtotime($uglyDate)); - break; - default: - $smDate = date('H:i, d F Y',strtotime($uglyDate)); + return date('H:i, j F Y',strtotime($uglyDate)); } - return $smDate; + else + { + return date('H:i, j ',strtotime($uglyDate)).gtext(date('F',strtotime($uglyDate))).date(' Y',strtotime($uglyDate)); + } +// switch ($lang) +// { +// case 'en': +// $smDate = date('H:i, d F Y',strtotime($uglyDate)); +// break; +// case 'it': +// $smDate = date('H:i, d F Y',strtotime($uglyDate)); +// break; +// default: +// $smDate = date('H:i, d F Y',strtotime($uglyDate)).date(' F ',strtotime($uglyDate)).date('Y',strtotime($uglyDate)); +// } +// return $smDate; } function pubDateFormat($uglyDate = null) -- cgit v1.2.3