HI
I have tow a php script to change English data to Persian ( for example: now is 1386 years in Iran calender an (آبان)
month.
In the attachment are tow files that change date() function to jdate()
function .
in the xoops CMS it is do.
in xoops:
this code insert in the include directory and functions.php file :
function formatTimestamp($time, $format="l", $timeoffset="")
{
global $xoopsConfig, $xoopsUser;
$usertimestamp = xoops_getUserTimestamp($time, $timeoffset);
switch (strtolower($format)) {
case 's':
$datestring = _SHORTDATESTRING;
break;
case 'm':
$datestring = _MEDIUMDATESTRING;
break;
case 'mysql':
$datestring = "Y-m-d H:i:s";
break;
case 'rss':
$datestring = "r";
break;
case 'l':
$datestring = _DATESTRING;
break;
default:
if ($format != '') {
$datestring = $format;
} else {
$datestring = _DATESTRING;
}
break;
}
// Start hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org
if (defined('_JDF_USE_HEGIRADATE') && _JDF_USE_HEGIRADATE && $format != 'mysql' ){
return ucfirst(jdate($datestring,$usertimestamp));
} else {
return ucfirst(date($datestring,$usertimestamp));
}
// End hacked by irmtfan for show hegira date in persian and other languages www.jadoogaran.org
}
you can help me to insert it in drupal CMS like as xoops CMs for Iranian people.
thanks.
there are tow file that I want attached to this issues :
jdf file : http://testd6.irdrupal.com/files/jdf.php.txt
lang_jdf file : http://testd6.irdrupal.com/files/lang_jdf.php.txt
( this files change date(); to jdate(); format )
Comments
Comment #1
pasqualleComment #2
mdupontSee contrib module http://drupal.org/project/calendar_systems for the Persian calendar. Closing.