From a84129330e372648b4e395a6af5423166d789eab Mon Sep 17 00:00:00 2001 From: Geliebte <1297754537@qq.com> Date: Wed, 9 Sep 2026 16:58:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A8=E7=AB=9920=E4=B8=AA=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E6=B7=BB=E5=8A=A0=E5=9B=BD=E9=99=85=E5=8C=96(i18n)?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20-=20=E7=AE=80=E4=BD=93=E4=B8=AD=E6=96=87/?= =?UTF-8?q?=E7=B9=81=E4=BD=93=E4=B8=AD=E6=96=87/=E8=8B=B1=E6=96=87?= =?UTF-8?q?=E4=B8=89=E8=AF=AD=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 所有18套前端模板 + 管理后台共20个HTML文件添加i18n引擎 - 前端JavaScript方案:I18N_LOCALES翻译字典 + data-i18n属性 + t()函数调用 - 语言切换器UI:下拉菜单选择,匹配各模板主题风格 - 语言持久化:localStorage存储 + URL参数覆盖 + 浏览器语言自动检测 - onLangChange回调:语言切换时动态重新渲染所有内容 - 支持语言:zh-CN(简体中文) / zh-TW(繁体中文) / en(English) --- web/dist/admin/index.html | 1697 ++++++++++++++---------------------- web/dist/app1/index.html | 553 +++++++++--- web/dist/app2/index.html | 469 ++++++++-- web/dist/app3/index.html | 535 +++++++++--- web/dist/food1/index.html | 895 ++++++++++++------- web/dist/food2/index.html | 504 +++++++++-- web/dist/food3/index.html | 514 +++++++++-- web/dist/game1/index.html | 752 ++++++++++++---- web/dist/game2/index.html | 1191 +++++++++++++------------ web/dist/game3/index.html | 1185 ++++++++++++++++--------- web/dist/music1/index.html | 636 +++++++++++--- web/dist/music2/index.html | 300 +++++-- web/dist/music3/index.html | 313 +++++-- web/dist/shop/index.html | 558 ++++++++++-- web/dist/shop2/index.html | 542 ++++++++++-- web/dist/shop3/index.html | 567 ++++++++++-- web/dist/shop4/index.html | 364 +++++--- web/dist/site1/index.html | 730 +++++++++++----- web/dist/site2/index.html | 484 +++++++--- web/dist/site3/index.html | 409 +++++++-- 20 files changed, 9343 insertions(+), 3855 deletions(-) diff --git a/web/dist/admin/index.html b/web/dist/admin/index.html index 04f80ba..f4131ba 100644 --- a/web/dist/admin/index.html +++ b/web/dist/admin/index.html @@ -1,15 +1,13 @@ - + -管理后台 - Gotest Admin +管理后台 - Gotest Admin - -
-

🔐 管理后台

-

Gotest Admin Dashboard

- +

🔐 管理后台

+

Gotest Admin Dashboard

-
- - -
-
- - -
- +
+
+
-
- - - - - -
diff --git a/web/dist/food1/index.html b/web/dist/food1/index.html index ec6b818..c008637 100644 --- a/web/dist/food1/index.html +++ b/web/dist/food1/index.html @@ -3,9 +3,8 @@ -美味达 · 外卖平台 +美味达 · 外卖平台 @@ -749,16 +777,37 @@ a { color: inherit; text-decoration: none; }
-
低卡轻食
-
新鲜直送
-
绿色包装
+
低卡轻食
+
新鲜直送
+
绿色包装
@@ -806,8 +855,8 @@ a { color: inherit; text-decoration: none; }
CATEGORIES -

美食分类

-

挑你所爱,一键直达心仪风味

+

美食分类

+

挑你所爱,一键直达心仪风味

@@ -820,10 +869,10 @@ a { color: inherit; text-decoration: none; }
FEATURED -

人气推荐

-

本月销量领先,大家都在点

+

人气推荐

+

本月销量领先,大家都在点

- 查看全部 → + 查看全部 →
@@ -835,27 +884,27 @@ a { color: inherit; text-decoration: none; }
RESTAURANTS -

全部餐厅

-

为你找到附近优质好店

+

全部餐厅

+

为你找到附近优质好店

- - - - + + + +
-
共 0 家餐厅
+
共 0 家餐厅
@@ -869,7 +918,7 @@ a { color: inherit; text-decoration: none; }
绿野鲜送
-

新鲜好味,绿色送达。致力于连接本地优质餐厅与健康食材,让每一餐都自然、轻盈、安心。

+

新鲜好味,绿色送达。致力于连接本地优质餐厅与健康食材,让每一餐都自然、轻盈、安心。

@@ -918,7 +967,7 @@ a { color: inherit; text-decoration: none; }
- 购物车 + 购物车
¥0
-
购物车是空的
+
购物车是空的
- +
diff --git a/web/dist/site1/index.html b/web/dist/site1/index.html index 511f0e7..702aa33 100644 --- a/web/dist/site1/index.html +++ b/web/dist/site1/index.html @@ -152,6 +152,34 @@ section{position:relative} .nav-toggle.open span:nth-child(2){opacity:0} .nav-toggle.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)} +/* ============ 语言切换器 ============ */ +.lang-switcher{position:relative;margin-left:8px} +.lang-btn{ + display:flex;align-items:center;gap:6px;padding:8px 14px;border-radius:10px; + font-size:13px;font-weight:600;color:var(--text-muted);cursor:pointer; + background:rgba(255,255,255,0.05);border:1px solid var(--glass-border); + transition:all .25s var(--ease); +} +.lang-btn:hover{color:#fff;background:rgba(255,255,255,0.1);border-color:rgba(0,212,255,0.3)} +.lang-btn svg{width:16px;height:16px} +.lang-dropdown{ + position:absolute;top:calc(100% + 8px);right:0;min-width:160px; + background:rgba(6,24,46,0.96);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px); + border:1px solid var(--glass-border);border-radius:var(--radius-sm); + box-shadow:0 12px 40px rgba(0,0,0,0.5);overflow:hidden; + opacity:0;transform:translateY(-8px);pointer-events:none; + transition:all .25s var(--ease);z-index:1001; +} +.lang-dropdown.open{opacity:1;transform:none;pointer-events:auto} +.lang-option{ + display:flex;align-items:center;gap:10px;padding:12px 16px; + font-size:14px;color:var(--text-muted);cursor:pointer;transition:all .2s; +} +.lang-option:hover{background:rgba(0,212,255,0.1);color:#fff} +.lang-option.active{color:var(--secondary);font-weight:600} +.lang-option .check{width:16px;height:16px;opacity:0;transition:opacity .2s} +.lang-option.active .check{opacity:1} + /* ============ Hero ============ */ .hero{ min-height:100vh;display:flex;align-items:center; @@ -464,6 +492,8 @@ section{position:relative} .footer-top{grid-template-columns:1fr} .about-card{padding:34px 26px} .hero-actions .btn{flex:1;justify-content:center} + .lang-switcher{position:static;margin-left:0} + .lang-dropdown{right:auto;left:0} } @@ -473,7 +503,7 @@ section{position:relative}
-

正在加载数据…

+

正在加载数据…

@@ -484,16 +514,37 @@ section{position:relative}
-
Nexus科技
+
Nexus科技
+
+ +
+
+ + 简体中文 +
+
+ + 繁體中文 +
+
+ + English +
+