mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
fixed language switch
This commit is contained in:
parent
b546126583
commit
deb62834b1
@ -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)
|
||||
})
|
||||
},
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user