Login!
Register as a new user Lost password?
 

MODx Bug/Feature Tracker and Feature Requests

Welcome to the MODx CMS Tracker. Please choose the appropriate project from the drop down menu and provide as much information as possible regarding your server environment and browser. Thanks!

FS#290 — Add SetLocale to language files

Attached to Project — MODx
Opened by David Molliere (davidm) - Tuesday, 28 February 2006, 03:12PM
Last edited by Ryan Thrash (rthrash) - Wednesday, 08 November 2006, 11:35AM
Task Type ToDo
Category Core Distribution
Status Unconfirmed
Assigned To No-one
Operating System All
Severity High
Priority Normal
Reported Version 0.9.1
Due in Version 0.9.7
Due Date Undecided
Percent Complete 0%

Details

Nissai from the french translator team suggested including SetLocale in the language file allow for date localization, site wide.

Example for francais.inc.php :

setlocale (LC_ALL, 'fr_FR');

I think we should all add this to the language file, so that users don't have to do anything about date localization.

There is something to be taken into consideration according to PHP documentation :
http://il2.php.net/setlocale

I quote : "Warning : The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server api like IIS or Apache on Windows you may experience sudden changes of locale settings while a script is running although the script itself never called setlocale() itself. This happens due to other scripts running in different threads of the same process at the same time changing the processwide locale using setlocale()."

This means it could cause trouble in Windows environment (IIS, Apache on Windows).

This task depends upon

This task blocks these from closing
Comment by Rene Tschannen (nightsignals) - Thursday, 29 November 2007, 09:08PM
Adding the locale to the language files doesn't really solve the localization problems site wide, but only for the manger, as this idea is based on the wrong assumption that the manager language matches the site language. Yet this approach is mixing frontend logic with backend logic. What I think we need is the ability to set the locale site wide for all documents, or even more granular on a per document basis, for multi language sites. And this independently from manager languages.