diff --git a/core/trunk/core/class/class_core_tools.php b/core/trunk/core/class/class_core_tools.php
index cbe4ae349863b73283338ea1ed59fe4c05a0878e..03bc61cd8defe1973d619d207a119e78c44c41bd 100644
--- a/core/trunk/core/class/class_core_tools.php
+++ b/core/trunk/core/class/class_core_tools.php
@@ -264,20 +264,18 @@ class core_tools extends functions
     /**
     * Loads language variables of each module
     *
-    * @param  $modules array Enabled modules of the application
+    * @param $modules array Enabled modules of the application
     */
     private function load_lang_modules($modules)
     {
-        for($i=0;$i<count($modules);$i++)
-        {
-            $file_path = $_SESSION['config']['corepath'].'modules'.DIRECTORY_SEPARATOR.$modules[$i]['moduleid'].DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.$_SESSION['config']['lang'].'.php';
-            if(isset($_SESSION['config']['lang']) && file_exists($file_path ))
-            {
-
-                include($file_path);
+        for ($i=0;$i<count($modules);$i++) {
+            $file_path = $_SESSION['config']['corepath'].'custom'.DIRECTORY_SEPARATOR.$_SESSION['custom_override_id'].DIRECTORY_SEPARATOR.'modules'.DIRECTOR$
+            if (!file_exists($file_path)) {
+                $file_path = $_SESSION['config']['corepath'].'modules'.DIRECTORY_SEPARATOR.$modules[$i]['moduleid'].DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEP$
             }
-            else
-            {
+            if (isset($_SESSION['config']['lang']) && file_exists($file_path)) {
+                include($file_path);
+            } else {
                 $_SESSION['error'] .= "Language file missing for module : ".$modules[$i]['moduleid']."<br/>";
             }
         }