/* ---------- 轻量 i18n: 先覆盖首页/页签/报告, 其余按需迁 ---------- */ const I18N = { 'zh-CN': { brand:'测天机', hero:'先验证过去,再预测未来', sub:'融合四大命理体系,推演你的人生轨迹', sub2:'八字 · 紫微 · 奇门 · 占星 多维交叉验证', cta:'输入生辰,开始验证', hint:'无需注册 · 免费验证过去 · 准了再说', tabChart:'命盘', tabGates:'六门', tabDiv:'问卦', tabFace:'相术', tabFuture:'往后三年', tabMatch:'合 盘', tabReport:'报 告', reportTplQuick:'客户速览(约700字)', reportTplFull:'完整命理(约2200字)', reportTplFocus:'专项咨询(约1200字)', reportTplMatch:'合盘关系(约1600字)', go:'成 文', print:'打 印' }, en: { brand:'Destiny Compass', hero:'Verify the past first, then read the future', sub:'Four systems cross-checked into one reading', sub2:'Bazi · Ziwei · Qimen · Astrology', cta:'Enter your birth data', hint:'No sign-up · Free past verification · Pay only if it lands', tabChart:'Chart', tabGates:'Six Gates', tabDiv:'Divination', tabFace:'Face', tabFuture:'Next 3 yrs', tabMatch:'Match', tabReport:'Report', reportTplQuick:'Quick read (~700 words)', reportTplFull:'Full scroll (~2200 words)', reportTplFocus:'Single question (~1200)', reportTplMatch:'Compatibility (~1600)', go:'Compose', print:'Print' } }; let LANG = (function(){ try { return localStorage.getItem('tj_lang') || 'zh-CN'; } catch(e){ return 'zh-CN'; } })(); function T(k){ const d = I18N[LANG] || I18N['zh-CN']; return d[k] !== undefined ? d[k] : (I18N['zh-CN'][k] !== undefined ? I18N['zh-CN'][k] : k); } function setLang(l){ LANG = I18N[l] ? l : 'zh-CN'; try { localStorage.setItem('tj_lang', LANG); } catch(e){} applyI18n(); } window.__setLang = setLang; document.addEventListener('click', function(ev){ if (!ev.target || ev.target.id !== 'langBtn') return; const next = (LANG === 'zh-CN') ? 'en' : 'zh-CN'; setLang(next); ev.target.textContent = (next === 'zh-CN') ? 'EN' : '中'; const g = document.getElementById('go'); if (g) g.textContent = T('cta'); }); function applyI18n(){ document.querySelectorAll('[data-i18n]').forEach(function(el){ const k = el.dataset.i18n; const v = T(k); if (v) el.textContent = v; }); document.querySelectorAll('[data-i18n-ph]').forEach(function(el){ const v = T(el.dataset.i18nPh); if (v) el.placeholder = v; }); document.documentElement.setAttribute('lang', LANG); }
融合四大命理体系,推演你的人生轨迹
八字 · 紫微 · 奇门 · 占星 多维交叉验证
无需注册 · 免费验证过去 · 准了再说
云端推演 · 生辰仅用于本次生成,不做留存