Skip to content

Commit

Permalink
fix: Set new locale into vuex store module when switching languages (#…
Browse files Browse the repository at this point in the history
…222)

Fixes #221
  • Loading branch information
xibman authored and paulgv committed Feb 15, 2019
1 parent d744dfc commit 77cc393
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/templates/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ middleware['i18n'] = async ({ app, req, res, route, store, redirect, isHMR }) =>
const messages = await loadLanguageAsync(app.i18n, newLocale)
app.i18n.locale = newLocale
app.i18n.onLanguageSwitched(oldLocale, newLocale)
syncVuex(locale, messages)
syncVuex(newLocale, messages)
} else {
// Lazy-loading disabled
app.i18n.locale = newLocale
Expand Down

0 comments on commit 77cc393

Please sign in to comment.