locales in news module

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
saltydog
Power Poster
Power Poster
Posts: 281
Joined: Fri Mar 04, 2005 9:06 am

locales in news module

Post by saltydog »

I have News module 2.0, but it always displays date in US format. I need to display months in my current locale (it_IT.UTF8)

This is my line of code:

Code: Select all

{cms_module module="news" dateformat="d-M-Y" number="5" summary="Notizie" length="10" moretext="leggi...<br>"  }
I have also this in the Summary Template:

Code: Select all

{$entry->postdate|date_format:"%d-%b-%Y"}
but always display "Aug Sep Oct" instead of "Ago Set Ott". Other internazionalization are working nice.
numer9

Re: locales in news module

Post by numer9 »

Hey, I just came across the same problem. Here's my approach:

created user-defined tag (which is PHP code) called is setloacale. In content set up this line:

Code: Select all

setlocale(LC_TIME, 'pl_PL');
And saved it.

Go back to template where I have the

Code: Select all

{cms_module module="News"} 
tag and just before that i inserted

Code: Select all

{setlocale}
tag, which is a link to my php-line.

And here's the bad part:It is working all right, but just for iso8859-2 (i can call in my php pl_PL.iso8859-2), but it doesn't work for UTF. I tried .UTF8, .UTF-8 notation - but my server just doesn't read it. Maybe the issue will be solved at your site.

regards,
#9
Post Reply

Return to “CMSMS Core”