View Full Version : Date format problem for international users (only months)
cclaerhout
12-21-2005, 11:41 PM
I've found a problem with date format, only for foreign users : the month isn't translated, it remains in english
In the news module configuration i've specified this format : d F Y - H\hi.
It should give this : 18 décembre 2005 - 23h36-
but it gives this : 18 December 2005 - 23h36-
That's strange because when i configure date format for vB, it works. With CMPS, it doesn't.
Where can i translate this ? I've tested in phrases, but nothing changes.
Brian
12-22-2005, 12:30 PM
I'm out of town right now and don't really have access to test things, but I'll move this to the bugs forum to make sure I see it when I get home.
cclaerhout
12-22-2005, 10:49 PM
Thanks Brian ; take your time, "it's not at the minute" (french expression, don't know if you've got the same in english :D)
Brian
12-23-2005, 02:05 PM
"It's not critical" or something along those lines would probably be the English equivalent. :)
cclaerhout
01-03-2006, 07:40 AM
Any litte news now ? ;)
Brian
01-03-2006, 01:58 PM
Could I get you to submit a support ticket via the Members' Area here so I can have a look at things on your server? I don't have any additional languages set up on my localhost, so it would take a little work in order for me to try and reproduce the problem locally. It would be much easier though if you wouldn't mind allowing me to take a look at things on your server. :)
cclaerhout
01-05-2006, 10:50 PM
Ok, no problem.
cclaerhout
01-13-2006, 06:37 AM
Still no news ;)
cclaerhout
09-05-2006, 12:53 AM
Here is the solution to correct this :
In news.php module,
Find :
$news['dateposted'] = vbdate($mod_options['portal_news_dateformat'], $news['postdateline'], '', '');
and put below :
$months = "/january|febrary|april|may|june|july|august|september|october|november|december/i";
if (preg_match($months, $news[dateposted], $monthname))
{
$monthname[0] = $vbphrase[strtolower($monthname[0])];
$news['dateposted'] = preg_replace($months, $monthname[0] , $news['dateposted']);
}
It would be nice to include that patch in next release.
cclaerhout
09-10-2006, 12:45 PM
So many thanks... that's too much lol
<ironic>
Thank you.
</ironic>
cclaerhout
02-19-2007, 08:12 PM
//NEW CODE UPDATE//
Fix a problem with february month
In news.php module,
Find :
$news['dateposted'] = vbdate($mod_options['portal_news_dateformat'], $news['postdateline'], '', '');
and put below :
$months = "/january|february|april|may|june|july|august|september|october|november|december/i";
if (preg_match($months, $news[dateposted], $monthname))
{
$monthname[0] = $vbphrase[strtolower($monthname[0])];
$news['dateposted'] = preg_replace($months, $monthname[0] , $news['dateposted']);
}
It would be nice to include that patch in next release.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.