From d183cb5255817dc431196964becef0db037f0620 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 20 Sep 2006 21:06:32 +0000 Subject: --- system/libraries/Language.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'system/libraries/Language.php') diff --git a/system/libraries/Language.php b/system/libraries/Language.php index 328d53e46..41dab46f4 100644 --- a/system/libraries/Language.php +++ b/system/libraries/Language.php @@ -66,12 +66,24 @@ class CI_Language { $idiom = ($deft_lang == '') ? 'english' : $deft_lang; } - if ( ! file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile)) + // Determine where the language file is and load it + + if (file_exists(APPPATH.'language/'.$idiom.'/'.$langfile)) { - show_error('Unable to load the requested language file: language/'.$langfile); + include_once(APPPATH.'language/'.$idiom.'/'.$langfile); + } + else + { + if (file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile)) + { + include_once(BASEPATH.'language/'.$idiom.'/'.$langfile); + } + else + { + show_error('Unable to load the requested language file: language/'.$langfile); + } } - include_once(BASEPATH.'language/'.$idiom.'/'.$langfile); if ( ! isset($lang)) { -- cgit v1.2.3-24-g4f1b