index.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // 导入通用模块
  2. import commonZhCN from './common/zh_CN'
  3. import commonEnUS from './common/en_US'
  4. // 导入页面模块
  5. import loginZhCN from './pages/login/zh_CN'
  6. import loginEnUS from './pages/login/en_US'
  7. // 导入pages-content模块
  8. import myZhCN from './pages-content/my/zh_CN'
  9. import myEnUS from './pages-content/my/en_US'
  10. // 导入组件模块
  11. import languageSwitcherZhCN from './components/languageSwitcher/zh_CN'
  12. import languageSwitcherEnUS from './components/languageSwitcher/en_US'
  13. // 按语言组织翻译数据
  14. export const messages = {
  15. 'zh-CN': {
  16. common: commonZhCN,
  17. login: loginZhCN,
  18. pagesContent: {
  19. my: myZhCN
  20. },
  21. components: {
  22. languageSwitcher: languageSwitcherZhCN
  23. }
  24. },
  25. 'en-US': {
  26. common: commonEnUS,
  27. login: loginEnUS,
  28. pagesContent: {
  29. my: myEnUS
  30. },
  31. components: {
  32. languageSwitcher: languageSwitcherEnUS
  33. }
  34. }
  35. }
  36. export const localeList = [
  37. {
  38. label: '简体中文',
  39. value: 'zh-CN'
  40. },
  41. {
  42. label: 'English',
  43. value: 'en-US'
  44. }
  45. ]
  46. // 默认语言
  47. export const defaultLocale = 'zh-CN'