mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 16:12:12 +00:00
17 lines
301 B
JavaScript
17 lines
301 B
JavaScript
import Vue from 'vue'
|
|
import VueI18n from 'vue-i18n'
|
|
import store from '~store'
|
|
|
|
Vue.use(VueI18n)
|
|
|
|
const i18n = new VueI18n({
|
|
locale: store.state.locale,
|
|
fallbackLocale: 'en',
|
|
messages: {
|
|
'en': require('~/locales/en.json'),
|
|
'fr': require('~/locales/fr.json')
|
|
}
|
|
})
|
|
|
|
export default i18n
|