From d50f75739720c05a2043d639bdd2b6660aaabe76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E8=BE=B0=E8=BD=A9?= Date: Tue, 7 Jun 2022 09:52:57 +0800 Subject: [PATCH] * SupportLang. --- module/common/view/header.lite.html.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/common/view/header.lite.html.php b/module/common/view/header.lite.html.php index b0e795ee68..f1382b5042 100755 --- a/module/common/view/header.lite.html.php +++ b/module/common/view/header.lite.html.php @@ -8,6 +8,7 @@ $defaultTheme = $webRoot . 'theme/default/'; $langTheme = $themeRoot . 'lang/' . $clientLang . '.css'; $clientTheme = $this->app->getClientTheme(); $onlybody = zget($_GET, 'onlybody', 'no'); +$supportLang = array('ru', 'vi', 'de', 'fr', 'ja', 'esp'); ?> @@ -31,7 +32,7 @@ $onlybody = zget($_GET, 'onlybody', 'no'); js::import($jsRoot . 'jquery/lib.js'); js::import($jsRoot . 'zui/min.js?t=' . $timestamp); - if($clientLang === 'ja') js::import($jsRoot . 'zui/lang.' . $clientLang . '.min.js?t=' . $timestamp); + if(in_array($clientLang, $supportLang)) js::import($jsRoot . 'zui/lang.' . $clientLang . '.min.js?t=' . $timestamp); js::import($jsRoot . 'my.full.js?t=' . $timestamp); } @@ -41,7 +42,7 @@ $onlybody = zget($_GET, 'onlybody', 'no'); if(!file_exists($this->app->getThemeRoot() . 'default/' . $this->cookie->lang . '.' . $this->cookie->theme . '.css')) $minCssFile = $defaultTheme . 'en.' . $this->cookie->theme . '.css'; css::import($minCssFile); js::import($jsRoot . 'all.js'); - if($clientLang === 'ja') js::import($jsRoot . 'zui/lang.' . $clientLang . '.min.js'); + if(in_array($clientLang, $supportLang)) js::import($jsRoot . 'zui/lang.' . $clientLang . '.min.js'); } if($this->app->getViewType() == 'xhtml') css::import($defaultTheme . 'x.style.css');