From 058cb8ba4701f5e13039724ee1a9bb42b3f32648 Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Sat, 8 Mar 2025 20:26:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=20Lang=20=E4=B8=AD?= =?UTF-8?q?=E9=97=B4=E4=BB=B6=EF=BC=8C=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E8=AF=AD=E8=A8=80=E4=B8=BA=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/middleware/Lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/middleware/Lang.php b/app/middleware/Lang.php index 55fda68..b1f20ce 100644 --- a/app/middleware/Lang.php +++ b/app/middleware/Lang.php @@ -10,7 +10,7 @@ class Lang implements MiddlewareInterface public function process(Request $request, callable $handler) : Response { // 获取请求头中的 Accept-Language - $acceptLanguage = $request->header('Accept-Language', 'zhcn'); // 默认值是 'zh_CN' + $acceptLanguage = $request->header('Accept-Language', 'en'); // 默认值是 'en' // 将 Accept-Language 中的语言与系统支持的语言进行匹配 // 这里假设我们支持 'zh_CN' 和 'en_US',你可以根据实际需求扩展更多语言