fix(i18n): set HTML lang attribute before Vue mounts via inline script

This commit is contained in:
ghostubborn
2026-04-02 14:14:32 +08:00
parent 65df257e19
commit ed465908db

View File

@@ -1,6 +1,7 @@
<!doctype html> <!doctype html>
<html lang="zh"> <html lang="zh">
<head> <head>
<script>document.documentElement.lang = localStorage.getItem('locale') || 'zh'</script>
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@100..800&family=Noto+Sans+SC:wght@300;400;500;700;800;900&family=Space+Grotesk:wght@300..700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@100..800&family=Noto+Sans+SC:wght@300;400;500;700;800;900&family=Space+Grotesk:wght@300..700&display=swap" rel="stylesheet">