Current date

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
gigicop
Forum Members
Forum Members
Posts: 56
Joined: Thu Jun 23, 2005 5:10 pm

Current date

Post 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.
Gigi
palmstrom

Re: Current date

Post 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
gigicop
Forum Members
Forum Members
Posts: 56
Joined: Thu Jun 23, 2005 5:10 pm

Re: Current date

Post 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.
Gigi
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Current date

Post by Ted »

There is also a locale setting in config.php that SHOULD do the same thing.
gigicop
Forum Members
Forum Members
Posts: 56
Joined: Thu Jun 23, 2005 5:10 pm

Re: Current date

Post 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.
Gigi
Ted
Power Poster
Power Poster
Posts: 3329
Joined: Fri Jun 11, 2004 6:58 pm

Re: Current date

Post by Ted »

Ah, yeah, that's a 0.10 thing.

Glad it's working now!
Post Reply

Return to “CMSMS Core”