Skip to content

Commit 325d18b

Browse files
committed
feat(国际化): 为语言按钮添加国旗表情符号
在语言切换按钮和触发按钮的文本前添加对应的国旗表情符号,以提升语言选择的视觉辨识度
1 parent 0b20cbc commit 325d18b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

index.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,21 +1763,21 @@
17631763
data-lang="zh"
17641764
onclick="switchLanguage('zh')"
17651765
>
1766-
中文
1766+
🇨🇳 中文
17671767
</button>
17681768
<button
17691769
class="lang-btn"
17701770
data-lang="en"
17711771
onclick="switchLanguage('en')"
17721772
>
1773-
English
1773+
🇬🇧 English
17741774
</button>
17751775
<button
17761776
class="lang-btn"
17771777
data-lang="ja"
17781778
onclick="switchLanguage('ja')"
17791779
>
1780-
日本語
1780+
🇯🇵 日本語
17811781
</button>
17821782
</div>
17831783
</div>
@@ -2662,9 +2662,9 @@ <h3 class="contact-subtitle">
26622662

26632663
const triggerBtn = document.querySelector(".language-trigger");
26642664
const langNames = {
2665-
zh: "中文",
2666-
en: "English",
2667-
ja: "日本語",
2665+
zh: "🇨🇳 中文",
2666+
en: "🇬🇧 English",
2667+
ja: "🇯🇵 日本語",
26682668
};
26692669
triggerBtn.textContent = langNames[lang];
26702670

0 commit comments

Comments
 (0)