mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进多语言判断机制
This commit is contained in:
@@ -211,6 +211,12 @@ class Lang
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (preg_match('/^([a-z\d\-]+)/i', $langSet, $matches)) {
|
||||||
|
$langSet = strtolower($matches[1]);
|
||||||
|
} else {
|
||||||
|
$langSet = self::$range;
|
||||||
|
}
|
||||||
|
|
||||||
// 合法的语言
|
// 合法的语言
|
||||||
if (empty(self::$allowLangList) || in_array($langSet, self::$allowLangList)) {
|
if (empty(self::$allowLangList) || in_array($langSet, self::$allowLangList)) {
|
||||||
self::$range = $langSet ?: self::$range;
|
self::$range = $langSet ?: self::$range;
|
||||||
|
|||||||
Reference in New Issue
Block a user