index.js 331 B

123456789101112131415
  1. import zhHans from './zh-hans.js'
  2. import zhHant from './zh-hant.js'
  3. import en from './en.js'
  4. const lang = navigator.language.toLowerCase()
  5. let text = zhHans
  6. if (lang === 'zh-cn' || lang === 'zh') {
  7. text = zhHans
  8. } else if (lang === 'zh-tw' || lang === 'zh-hk') {
  9. text = zhHant
  10. } else {
  11. text = en
  12. }
  13. export default text