Date localization guidelines for multilanguage sites

Permalink
Hi all,
I am working with Concrete5 5.4.2.2 and I would like to understand what are the guidelines to correctly write code for multilingual sites.
I am interested in understanding what approach to use to have dates in english and in italian, like these:
- 25-10-2011 , 25-Ott-2011 or 25 Ottobre 2011

Actually, I added all month (3 letters), month (full name), day (3 letters) and day (full name) words into messages.po for concrete 5.4.2.2 core, and use this approach:

for month:
echo t(date('F', strtotime($date)))
echo t(date('M', strtotime($date)))


for day:
echo t(date('D', strtotime($date)))
echo t(date('l', strtotime($date)))


Can it be a good way or do you suggest other approaches ?
Thanks
Matteo

matteo
 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.