Skip to content

Commit

Permalink
📝 docs(examples): update ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed May 14, 2017
1 parent c5f043f commit e7bcfb1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion examples/ssr/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Vue from 'vue'
import App from './App.vue'
import { createStore } from './store'
import { createRouter } from './router'
import i18n from './i18n'
import { createI18n } from './i18n'
import { sync } from 'vuex-router-sync'
import titleMixin from './util/title'
import * as filters from './util/filters'
Expand All @@ -21,6 +21,7 @@ export function createApp () {
// create store and router instances
const store = createStore()
const router = createRouter()
const i18n = createI18n()

// sync the router with the vuex store.
// this registers `store.state.route`
Expand Down
16 changes: 9 additions & 7 deletions examples/ssr/src/i18n/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ import jp from './ja-JP.json'

Vue.use(VueI18n)

export default new VueI18n({
locale: 'en-US',
messages: {
'en-US': en,
'ja-JP': jp
}
})
export function createI18n () {
return new VueI18n({
locale: 'en-US',
messages: {
'en-US': en,
'ja-JP': jp
}
})
}

0 comments on commit e7bcfb1

Please sign in to comment.