Update i18n example

This commit is contained in:
Sébastien Chopin 2017-06-04 14:28:39 +02:00
parent 2f32d03f83
commit b26d3d6b6f
2 changed files with 4 additions and 7 deletions

View File

@ -1,16 +1,13 @@
module.exports = { module.exports = {
loading: { color: 'cyan' },
build: { build: {
vendor: ['vue-i18n'] vendor: ['vue-i18n']
}, },
router: { router: {
middleware: 'i18n' middleware: 'i18n'
}, },
plugins: [ plugins: ['~plugins/i18n.js',],
// Will inject the plugin in the $root app and also in the context as `i18n`
{ src: '~plugins/i18n.js', injectAs: 'i18n' }
],
generate: { generate: {
routes: ['/', '/about', '/fr', '/fr/about'] routes: ['/', '/about', '/fr', '/fr/about']
}, }
loading: { color: 'cyan' },
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "nuxt-i18n", "name": "nuxt-i18n",
"dependencies": { "dependencies": {
"nuxt": "latest", "nuxt": "1.0.0-alpha.3",
"vue-i18n": "^7.0.0" "vue-i18n": "^7.0.0"
}, },
"scripts": { "scripts": {