French Dates

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
The Public Knowledge Project Support Forum is moving to

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.
Posts: 266
Joined: Fri Nov 18, 2005 12:48 pm
Location: Hamilton, Ontario

French Dates

Postby tshore » Tue Nov 24, 2009 10:00 am

I just did a little hack to allow dates to be displayed in the correct language. In the file:


I added the following two lines at the top of the function smarty_modifier_date_format:

Code: Select all

$locale = Locale::getLocale().'.UTF-8';
   setlocale(LC_ALL, $locale);

Warning: The suffix that I added to the locale: .UTF-8 won't work on all servers. If it doesn't work, then you will need to look at the locales installed on your server and see exactly what they were called. I found the locales on my server in /usr/share/locale.

Return to “OCS Technical Support”

Who is online

Users browsing this forum: No registered users and 1 guest