1
李凌
2025-09-19 f44047eff925ddba1726adc9f9cb8b2bcdec5053
src/i18n/index.js
@@ -10,7 +10,8 @@
import  vi from './vi'
import  th from './th'
import  Italy from './Italy'
const lang = getStorage('lang') || 'en'
import Spanish from './Spanish'
const lang = getStorage('lang') || 'Spanish'
const messages = {
  'en': {
@@ -43,13 +44,16 @@
  'Italy': {
    ...Italy
  },
  'Spanish': {
    ...Spanish
  },
}
const i18n = createI18n({
  legacy: false,
  locale: lang, // 首先从缓存里拿,没有的话就用浏览器语言,
  fallbackLocale: 'en', // 设置备用语言
  fallbackLocale: 'Spanish', // 设置备用语言
  messages,
})