fix martin marques' report of failure to respect default language. move lang init...
authorchriskl <chriskl>
Mon, 12 May 2003 02:07:17 +0000 (02:07 +0000)
committerchriskl <chriskl>
Mon, 12 May 2003 02:07:17 +0000 (02:07 +0000)
libraries/lib.inc.php

index dd3be6c2398f86132e6f3d271cd0a3026175d186..354d3aef04889c40da3164074ae5795b7ebd8c56 100644 (file)
@@ -3,7 +3,7 @@
        /**
         * Function library read in upon startup
         *
-        * $Id: lib.inc.php,v 1.45 2003/05/08 15:14:15 chriskl Exp $
+        * $Id: lib.inc.php,v 1.46 2003/05/12 02:07:17 chriskl Exp $
         */
        
        // Set error reporting level to max
        );
 
        // Language settings.  Always include english.php, since it's the master
-       // language file, and then overwrite it with the user-specified language.
-       // Default language to English if it's not set.
+       // language file, and then overwrite it with the user-specified language if
+       // one has not been selected yet.
        if (!isset($conf['default_lang'])) $conf['default_lang'] = 'english';
+       $lang = array();
        include_once('lang/recoded/english.php');
+       // Include default language over the top - we really should try to avoid this
+       // in the case when the user has chosen a language.
+       include_once("lang/recoded/" . strtolower($conf['default_lang']) . ".php");
 
        // Check for config file version mismatch
        if (!isset($conf['version']) || $conf['base_version'] > $conf['version']) {
        }
 
        // Import language file
-       $lang = array();
        include("lang/recoded/" . strtolower($_SESSION['webdbLanguage']) . ".php");
 
        // Create data accessor object, if valid, and if necessary