mirror of
https://gitlab.easter-eggs.com/ee/ldapsaisie.git
synced 2024-11-22 18:09:06 +01:00
LSlang: fix handling locales that only existing in local directory
This commit is contained in:
parent
516cc12d1b
commit
0b850e8acb
1 changed files with 2 additions and 2 deletions
|
@ -149,7 +149,7 @@ class LSlang extends LSlog_staticLoggerClass {
|
|||
$regex = '/^([a-zA-Z_]+)\.[a-zA-Z0-9\-]+$/';
|
||||
}
|
||||
self :: log_trace("getLangList(".varDump($encoding).", $with_encoding) : regex='$regex'");
|
||||
foreach(array(LS_I18N_DIR_PATH, LS_LOCAL_DIR.'/'.LS_I18N_DIR) as $lang_dir) {
|
||||
foreach(array(LS_I18N_DIR_PATH, LS_ROOT_DIR.'/'.LS_LOCAL_DIR.'/'.LS_I18N_DIR) as $lang_dir) {
|
||||
if (!is_dir($lang_dir))
|
||||
continue;
|
||||
if ($handle = opendir($lang_dir)) {
|
||||
|
@ -207,7 +207,7 @@ class LSlang extends LSlog_staticLoggerClass {
|
|||
if ($locale == 'en_US.UTF8') {
|
||||
return true;
|
||||
}
|
||||
foreach(array(LS_I18N_DIR_PATH, LS_LOCAL_DIR.'/'.LS_I18N_DIR) as $lang_dir)
|
||||
foreach(array(LS_I18N_DIR_PATH, LS_ROOT_DIR.'/'.LS_LOCAL_DIR.'/'.LS_I18N_DIR) as $lang_dir)
|
||||
if (is_dir("$lang_dir/$locale"))
|
||||
return true;
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue