Page 1 of 1

Current date

Posted: Mon Aug 15, 2005 10:26 pm
by gigicop
Hi everyone.
I've just added the current date tag to a template of my web site. The date is displaied in english. I would like to display it in italian. Is there a way to do this? I suppose that this problem has already been covered before, but I couldn't find anything in previous messages, and I didn't understand the help. Can you help me? Thanks in advance.

Re: Current date

Posted: Wed Aug 24, 2005 4:54 pm
by palmstrom
Look on help to current_date tag in "modules" in "extensions" in administration console. You can customize format of date.

If you want names of months in Italian, than it will be probably simplest to modify plugins/function.current_date.php as described here: http://www.php.net/manual/en/function.s ... p#AEN26621

Re: Current date

Posted: Wed Aug 24, 2005 9:56 pm
by gigicop
Hi.
Unfortunately I have almost no experience with PHP and I couldn't understand that help. Finally I found something easier for me and I added the command
setlocale(LC_TIME,"it_IT");
to the file index.php right after "?PHP". Now everything works correctly. Of course I should learn more of PHP but...
Thank you very much for your reply.
Bye.

Re: Current date

Posted: Thu Aug 25, 2005 12:37 am
by Ted
There is also a locale setting in config.php that SHOULD do the same thing.

Re: Current date

Posted: Thu Aug 25, 2005 4:25 pm
by gigicop
Hi!
I'm using CMSMS v. 0.9.2 and I couldn't find that string in config.php. Anyway I've added it and it works fine now.
Thank you very much for your help.
Bye.

Re: Current date

Posted: Thu Aug 25, 2005 4:30 pm
by Ted
Ah, yeah, that's a 0.10 thing.

Glad it's working now!