Page 1 of 1

locales in news module

Posted: Wed Sep 28, 2005 5:17 pm
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.

Re: locales in news module

Posted: Wed Oct 19, 2005 10:32 pm
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