summaryrefslogtreecommitdiffstats
path: root/system/core/Lang.php
diff options
context:
space:
mode:
authorphilsturgeon <devnull@localhost>2011-06-15 17:00:03 +0200
committerphilsturgeon <devnull@localhost>2011-06-15 17:00:03 +0200
commit0fe54dbaf89a8337d27b9203f74891cf1a799715 (patch)
treece168b3c24788e5a4a31e0cc65b64f54e25ee8a2 /system/core/Lang.php
parent3a43c7adae7737d68a0eeca663cc2dd3fc5b0cf3 (diff)
parent3ef65bd7491f847fecdab1acc9687f0e90eee09b (diff)
Merged Alex Bilbies MSSQL changes.
Diffstat (limited to 'system/core/Lang.php')
-rw-r--r--system/core/Lang.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/system/core/Lang.php b/system/core/Lang.php
index fb177902e..79eb443a0 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -1,4 +1,4 @@
-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -51,14 +51,14 @@ class CI_Lang {
*/
function load($langfile = '', $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
{
- $langfile = str_replace(EXT, '', $langfile);
+ $langfile = str_replace('.php', '', $langfile);
if ($add_suffix == TRUE)
{
$langfile = str_replace('_lang.', '', $langfile).'_lang';
}
- $langfile .= EXT;
+ $langfile .= '.php';
if (in_array($langfile, $this->is_loaded, TRUE))
{
@@ -129,12 +129,19 @@ class CI_Lang {
*/
function line($line = '')
{
- $line = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];
- return $line;
+ $value = ($line == '' OR ! isset($this->language[$line])) ? FALSE : $this->language[$line];
+
+ // Because killer robots like unicorns!
+ if ($value === FALSE)
+ {
+ log_message('error', 'Could not find the language line "'.$line.'"');
+ }
+
+ return $value;
}
}
// END Language Class
/* End of file Lang.php */
-/* Location: ./system/core/Lang.php */ \ No newline at end of file
+/* Location: ./system/core/Lang.php */