diff --git a/layouts/default.vue b/layouts/default.vue index 2e7f7bd6f..8f2195552 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -129,7 +129,7 @@ export default { return } import(`~/locales/${locale}.json`).then(res => { - this.$i18n.add(locale, res) + this.$i18n.add(locale, res.default) this.$i18n.set(locale) }) }, diff --git a/plugins/i18n.js b/plugins/i18n.js index 03ef61776..1bae5bceb 100644 --- a/plugins/i18n.js +++ b/plugins/i18n.js @@ -63,7 +63,7 @@ export default ({ app, req, cookie, store }) => { const locale = availableLocales.indexOf(userLocale) >= 0 ? userLocale : 'en' if (locale !== 'en') { - Vue.i18n.add(locale, require(`~/locales/${locale}.json`)) + Vue.i18n.add(locale, require(`~/locales/${locale}.json`).default) } // Set the start locale to use