minor
This commit is contained in:
@@ -7,11 +7,13 @@ Vue.use(VueI18n)
|
|||||||
export default async ({ app, store, res }) => {
|
export default async ({ app, store, res }) => {
|
||||||
const messages = {}
|
const messages = {}
|
||||||
if (process.server) {
|
if (process.server) {
|
||||||
|
if (res.locals) {
|
||||||
store.commit('setLocale', res.locals.acceptedLocale)
|
store.commit('setLocale', res.locals.acceptedLocale)
|
||||||
if (res.locals.user_locale) {
|
if (res.locals.user_locale) {
|
||||||
store.commit('setUserLocale', res.locals.user_locale)
|
store.commit('setUserLocale', res.locals.user_locale)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
messages[store.state.locale] = await import(/* webpackChunkName: "lang-[request]" */`../locales/${store.state.locale}.json`)
|
messages[store.state.locale] = await import(/* webpackChunkName: "lang-[request]" */`../locales/${store.state.locale}.json`)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user