It would be nice to have a field that allows to set the date format in other languages than English.
Yeah s'easy enough; change this line in tablemanager_display;
case "3": // Date $exp = explode('/', $a); $temp[] = array('data' => '<!-- '.$a.' -->'.date(variable_get('tablemanager_date_format', 'jS F Y'), mktime(0, 0, 0, $exp['1'], $exp['2'], $exp['0']))); break;
To;
case "3": // Date $exp = explode('/', $a); setlocale(LC_TIME, "de_DE"); // German $temp[] = array('data' => '<!-- '.$a.' -->'.strftime(variable_get('tablemanager_date_format', 'jS F Y'), mktime(0, 0, 0, $exp['1'], $exp['2'], $exp['0']))); break;
You'll need to set the date format (on your settings page, NOT in the code here) to something from here; http://www.php.net/manual/en/function.strftime.php
(for an example try "%A %d %B %Y" which will output for instance, Friday 22 December 1978 in whatever language you've set the locale to).
Let me know if this works as it should as I can't test it on my server (functionality not installed...)
Pobster
Thanks a lot, it worked. I added setlocale(LC_TIME, "de_DE.UTF8"); // German and set the date format according to your link.
I am using 000webhost.com and I can not find this settings (probably functionality not installed) I want to change date language to russian.
Any help?
Which version of Drupal are you using? This issue is related to 4.7 - are you really still using this?
Comments
Comment #1
pobster commentedYeah s'easy enough; change this line in tablemanager_display;
To;
You'll need to set the date format (on your settings page, NOT in the code here) to something from here; http://www.php.net/manual/en/function.strftime.php
(for an example try "%A %d %B %Y" which will output for instance, Friday 22 December 1978 in whatever language you've set the locale to).
Let me know if this works as it should as I can't test it on my server (functionality not installed...)
Pobster
Comment #2
chris.gr commentedThanks a lot, it worked. I added
setlocale(LC_TIME, "de_DE.UTF8"); // German
and set the date format according to your link.
Comment #3
pobster commentedComment #4
pobster commentedComment #5
prorva commentedI am using 000webhost.com and I can not find this settings (probably functionality not installed)
I want to change date language to russian.
Any help?
Comment #6
pobster commentedWhich version of Drupal are you using? This issue is related to 4.7 - are you really still using this?