Fix i18n example

This commit is contained in:
Sebastien Chopin 2017-09-06 15:32:09 +02:00
parent 1de4a16a02
commit 3cb603f922

View File

@ -3,11 +3,11 @@ import VueI18n from 'vue-i18n'
Vue.use(VueI18n) Vue.use(VueI18n)
export default ({ app, isClient, store, serverStore }) => { export default ({ app, isClient, store }) => {
// Set i18n instance on app // Set i18n instance on app
// This way we can use it in middleware and pages asyncData/fetch // This way we can use it in middleware and pages asyncData/fetch
app.i18n = new VueI18n({ app.i18n = new VueI18n({
locale: (isClient ? serverStore.locale : store.state.locale), locale: store.state.locale,
fallbackLocale: 'en', fallbackLocale: 'en',
messages: { messages: {
'en': require('~/locales/en.json'), 'en': require('~/locales/en.json'),