Date language (how to change months names)

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.
Locked
Cieska

Date language (how to change months names)

Post by Cieska »

In my web site template i have inserted line {current_date format="%A, %b %d d."}
My site global seetings is Lithuanian language. My date shows in Lithuanian language. I would like to correct a little bit Lithuanian words in this data but i don't know where is the file. I would like to change all seven days names and months.
Please help me.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Date language (how to change months names)

Post by Dee »

The formatted date is generated by PHP (see the help for the current_date tag):
http://www.php.net/strftime

You'd have to set the proper locale and I think PHP must be compiled with support for your locale to support localized date strings.
Cieska

Re: Date language (how to change months names)

Post by Cieska »

Thanks for your answer.
But i think it must be way to change this date.

Maybe exist small script and i need only insert php code to my web site and then i will see correct date.
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Date language (how to change months names)

Post by tsw »

Well thats what dee said. You need to set up right locale (with a small php oneliner)

And I think there is a locale setting in config.php...
tsw
Power Poster
Power Poster
Posts: 1408
Joined: Tue Dec 13, 2005 10:50 pm

Re: Date language (how to change months names)

Post by tsw »

Of course the server needs to support that locale...
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: Date language (how to change months names)

Post by Dee »

If that doesn't work you can try implementing this class (or create something similar):
http://www.zend.com/codex.php?id=1200&single=1
salva_gl
New Member
New Member
Posts: 4
Joined: Mon Apr 06, 2009 9:05 pm

Re: Date language (how to change months names)

Post by salva_gl »

Hi, I've tried the option that 'tsw" said, and that work fine! ;) thanks

In the config.php file edit this line (change the locale 'es_ES' for yours):

$config['locale'] = 'es_ES';

Thanks.
Locked

Return to “CMSMS Core”