From 9d43db475b86218db1b68515200a0ec887bb43a9 Mon Sep 17 00:00:00 2001 From: Sebastien Chopin Date: Fri, 1 Sep 2017 17:38:16 +0200 Subject: [PATCH] Fix example --- examples/i18n/package.json | 2 +- examples/i18n/plugins/i18n.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/i18n/package.json b/examples/i18n/package.json index 5ca4f709ba..6c75b31cb7 100644 --- a/examples/i18n/package.json +++ b/examples/i18n/package.json @@ -1,7 +1,7 @@ { "name": "nuxt-i18n", "dependencies": { - "nuxt": "latest", + "nuxt": "^1.0.0-rc9", "vue-i18n": "^7.0.5" }, "scripts": { diff --git a/examples/i18n/plugins/i18n.js b/examples/i18n/plugins/i18n.js index e4859aadc9..c767fd7f3e 100644 --- a/examples/i18n/plugins/i18n.js +++ b/examples/i18n/plugins/i18n.js @@ -3,11 +3,11 @@ import VueI18n from 'vue-i18n' Vue.use(VueI18n) -export default ({ app, store }) => { +export default ({ app, isClient, store, serverStore }) => { // Set i18n instance on app // This way we can use it in middleware and pages asyncData/fetch app.i18n = new VueI18n({ - locale: store.state.locale, + locale: (isClient ? serverStore.locale : store.state.locale), fallbackLocale: 'en', messages: { 'en': require('~/locales/en.json'),