lang.js 349 B

1234567891011121314151617181920212223
  1. import Vue from 'vue'
  2. import VueI18n from 'vue-i18n'
  3. import en from './en'
  4. import zh from './zh'
  5. import kr from './kr'
  6. import { getLanguage, Cookie } from '../util'
  7. Vue.use(VueI18n)
  8. let messages = {
  9. en,
  10. zh,
  11. kr
  12. }
  13. let locale = Cookie.getCookie('lang') || getLanguage()
  14. const i18n = new VueI18n({
  15. locale,
  16. messages
  17. })
  18. export default i18n