Merge pull request #1362 from AndreasK79/language_fix_default_english
[Language] If core language files not found, use English.
这个提交包含在:
当前提交
8030d70480
共有 1 个文件被更改,包括 16 次插入 和 1 次删除
|
|
@ -146,8 +146,23 @@ class CI_Lang {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// try to load in default language (english) //
|
||||
if (($found !== TRUE)&&($idiom != 'english')) {
|
||||
$idiom = 'english';
|
||||
foreach (get_instance()->load->get_package_paths(TRUE) as $package_path)
|
||||
{
|
||||
$package_path .= 'language/'.$idiom.'/'.$langfile;
|
||||
if ($basepath !== $package_path && file_exists($package_path))
|
||||
{
|
||||
include($package_path);
|
||||
$found = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($found !== TRUE)
|
||||
{
|
||||
show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile);
|
||||
|
|
|
|||
正在加载…
在新工单中引用