add to use english language if ask not found

add to use the english language file, if the ask language not found
这个提交包含在:
abarrau 2021-04-11 08:34:55 +02:00 提交者 GitHub
父节点 7ed5a89253
当前提交 62e2562cef
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23

查看文件

@ -146,8 +146,22 @@ class CI_Lang {
break; 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) if ($found !== TRUE)
{ {
show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile); show_error('Unable to load the requested language file: language/'.$idiom.'/'.$langfile);