Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Help about language or locale settings

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks
View previous topic :: View next topic  
Author Message
pitbull1978
Smarty Rookie


Joined: 26 Feb 2004
Posts: 7
Location: Milan - Italy

PostPosted: Wed Mar 10, 2004 10:40 am    Post subject: Help about language or locale settings Reply with quote

Hi! I've got a problem with language or locale settings in Smarty.
I've used date_format in my templates and I want that the function displays date in italian.
The strange thing is that yesterday the function displayed the date in italian, but today when I came back to office, it displayed the date in english. I want that in Italian !!!

For example I want my date like this:

LUN, 8 Marzo 2004

I formatted it as:
{$mydate|date_format:"%A"|truncate:"3":""|upper}, {$mydate|date_format:"%e %B %Y"}

Today it is displayed as:

WEN, 8 March 2004

...in English !!!

I tryied at the top of the php script before processing everything:

setlocale(LC_ALL,"ita")
or
setlocale(LC_ALL,"it@euro")

but nothing and nothing...
How can I do ? Please help me !!!
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
pitbull1978
Smarty Rookie


Joined: 26 Feb 2004
Posts: 7
Location: Milan - Italy

PostPosted: Wed Mar 10, 2004 10:49 am    Post subject: Reply with quote

I found myself the answer:

I used:

setlocale(LC_ALL,"italian");

and everything seems to go !!!

Look at this URL for language settings:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_language_strings.asp
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Tips and Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP