]> git.mjollnir.org Git - moodle.git/commitdiff
On second thoughts, don't apply locale to numbers because it may
authormoodler <moodler>
Tue, 29 Oct 2002 15:33:09 +0000 (15:33 +0000)
committermoodler <moodler>
Tue, 29 Oct 2002 15:33:09 +0000 (15:33 +0000)
affect some calculations.   Just strings and times.

lib/setup.php

index 47bd46d5554d9b390fb8028fa2b40dac3303e86b..033c888dea34bafafccd2b2792c5f1718790f48c 100644 (file)
 
 /// Set language/locale of printed times etc (must be supported by OS)
 
-    if (! setlocale ("LC_ALL", $CFG->locale)) {
-        setlocale ("LC_ALL", $CFG->lang);        // Might work
+    if (!$CFG->locale) {
+        $CFG->locale = $CFG->lang; // Might work
     }
+    setlocale ("LC_TIME", $CFG->locale);
+    setlocale ("LC_CTYPE", $CFG->locale);
+    setlocale ("LC_COLLATE", $CFG->locale);
 
 /// Reference code to remove magic quotes from everything ... just in case.
 /// If you have problems with slashes everywhere then you might want to