summaryrefslogtreecommitdiffstats
path: root/system/core/Lang.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2011-01-27 12:56:45 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2011-01-27 12:56:45 +0100
commit3bb336cf1c55584bb92ed32563a9543ec7f01574 (patch)
tree76c2d963be0b7c70705369ca4a9f82946df8bba8 /system/core/Lang.php
parent7d3a1894be6b1722c668d73ce53533bb72cc237c (diff)
parent705a3eec44635f3fada8daa2886d409e6447ca12 (diff)
Automated merge with https://bitbucket.org/ellislab/codeigniter
Diffstat (limited to 'system/core/Lang.php')
-rw-r--r--system/core/Lang.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/system/core/Lang.php b/system/core/Lang.php
index 6805d0e4a..fb177902e 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -78,17 +78,21 @@ class CI_Lang {
{
include($alt_path.'language/'.$idiom.'/'.$langfile);
}
- elseif (file_exists(APPPATH.'language/'.$idiom.'/'.$langfile))
- {
- include(APPPATH.'language/'.$idiom.'/'.$langfile);
- }
else
{
- if (file_exists(BASEPATH.'language/'.$idiom.'/'.$langfile))
+ $found = FALSE;
+
+ foreach (get_instance()->load->get_package_paths(TRUE) as $package_path)
{
- include(BASEPATH.'language/'.$idiom.'/'.$langfile);
+ if (file_exists($package_path.'language/'.$idiom.'/'.$langfile))
+ {
+ include($package_path.'language/'.$idiom.'/'.$langfile);
+ $found = TRUE;
+ break;
+ }
}
- else
+
+ if ($found !== TRUE)
{
show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile);
}