diff options
author | Derek Allard <derek.allard@ellislab.com> | 2007-07-16 00:49:07 +0200 |
---|---|---|
committer | Derek Allard <derek.allard@ellislab.com> | 2007-07-16 00:49:07 +0200 |
commit | 79ecefd0ec2cc7e2bcf35fad4f80e22d9ac70e16 (patch) | |
tree | 71eeb7abc3592ba3f364120170988d0c76c3497c | |
parent | 5f41eddda985b85763c0b275a411b2503ca51496 (diff) |
fix for scaffolding
-rw-r--r-- | system/libraries/Language.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/system/libraries/Language.php b/system/libraries/Language.php index bcf84cf67..26775ec7e 100644 --- a/system/libraries/Language.php +++ b/system/libraries/Language.php @@ -49,7 +49,7 @@ class CI_Language { * @param string the language (english, etc.)
* @return void
*/
- function load($langfile = '', $idiom = '')
+ function load($langfile = '', $idiom = '', $return = FALSE)
{
$langfile = str_replace(EXT, '', str_replace('_lang.', '', $langfile)).'_lang'.EXT;
@@ -82,12 +82,18 @@ class CI_Language { }
}
+
if ( ! isset($lang))
{
log_message('error', 'Language file contains no data: language/'.$idiom.'/'.$langfile);
return;
}
+ if ($return == TRUE)
+ {
+ return $lang;
+ }
+
$this->is_loaded[] = $langfile;
$this->language = array_merge($this->language, $lang);
unset($lang);
|