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'),