summaryrefslogtreecommitdiffstats
path: root/system/core/Lang.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2010-12-27 18:41:33 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2010-12-27 18:41:33 +0100
commit5cbe4dd1f0d94791fe86e08111b77c1d57b83f54 (patch)
tree54cfcbe82e0632bf9d438c288f00ccf817d8f3d3 /system/core/Lang.php
parentbde25d971bfbf4a54f1d40eedfd3290ebb5f91e5 (diff)
parentde3dbc36dab42d86c66d76efd6fdb1d1dce71ce8 (diff)
Automated merge with http://hg.ellislab.com/CodeIgniter-Reactor
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 e7867b354..8ec179771 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);
}