-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
hi
trying to add vuex-i18n to my nuxt project no luck so far .
i'm getting this error message,
Cannot set property $i18n of [object Object] which has only a getter
my code so far :
import Vue from 'vue'
import Vuex from 'vuex'
// load and register the vuex i18n module
import vuexI18n from 'vuex-i18n/dist/vuex-i18n.umd.js'
const doDebug = process.env.NODE_ENV !== 'production'
const store = new Vuex.Store({
strict: doDebug
})
Vue.use(
vuexI18n.plugin,
store,
{
onTranslationNotFound: function (locale, key) {
console.warn(`vuex-i18n :: Key '${key}' not found for locale '${locale}'`)
}
})
import { english } from '~/static/i18n/en.json'
import { farsi } from '~/static/i18n/fa.json'
Vue.i18n.add('en', english);
Vue.i18n.add('fa', farsi);
Vue.i18n.set('fa')
Vue.i18n.fallback('fa')
export default store
tleperou
Metadata
Metadata
Assignees
Labels
No labels