mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 00:45:34 +00:00
load language file of extension if available
This commit is contained in:
parent
e2ed43a633
commit
3dd1c2cd4e
|
@ -30,5 +30,20 @@ foreach($EXT_CONF as $extname=>$extconf) {
|
|||
if(method_exists($obj, 'init'))
|
||||
$obj->init();
|
||||
}
|
||||
if(isset($extconf['language']['file'])) {
|
||||
$langfile = $settings->_rootDir."/ext/".$extname."/".$extconf['language']['file'];
|
||||
if(file_exists($langfile)) {
|
||||
unset($__lang);
|
||||
include($langfile);
|
||||
if($__lang) {
|
||||
foreach($__lang as $lang=>&$data) {
|
||||
if(isset($GLOBALS['LANG'][$lang]))
|
||||
$GLOBALS['LANG'][$lang] = array_merge($GLOBALS['LANG'][$lang], $data);
|
||||
else
|
||||
$GLOBALS['LANG'][$lang] = $data;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user