I tried to create a localized list of registered users and was surprized as all birthdays were displayed without localization.
Short investigation revealed the problem in file profile/views_handler_field_profile_date.inc.
Function render($value) utilizes it's own date formatting engine and don't support any localization.
That's pretty strange why Drupal API function format_date(...) wasn't used.
I tried to comment out everything below line 45:
$date = gmmktime(0, 0, 0, $value['month'], $value['day'], 1970);
until
return strtr($format, $replace);
then change the return to:
return format_date($date, 'custom', $format);
This solution works perfectly for me, so I think the function must be rewritten to utilize format_date(...) for localization support.
Comments
Comment #1
dawehnerGood idea
has to be changed to
then it should work better.
Can you make a patch?
Comment #2
merlinofchaos commentedThere's a comment right in the code that says why we don't use format_date(). Did you not read that comment? :(
That said, changing the various date() calls to format_date() might handle the localization.
Comment #3
iamjon commentedAssigning this to myself to try write up a patch
Comment #4
iamjon commentedpatch attached.
merlinofchaos, i couldn't find any date() calls am I missing something?
Comment #5
tomgf commentedSubscribe
Comment #6
dawehnerThis got already committed to 7.x-3.x and 6.x-3.x
Thanks iamjon for the work on that.