File tree Expand file tree Collapse file tree 2 files changed +33
-34
lines changed Expand file tree Collapse file tree 2 files changed +33
-34
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ module.exports = function (userOptions) {
31
31
const pluginsPath = join ( __dirname , PLUGINS_DIR )
32
32
const templatesPath = join ( __dirname , TEMPLATES_DIR )
33
33
const requiredPlugins = [ 'main' , 'routing' ]
34
- const options = { ...DEFAULT_OPTIONS , ...userOptions }
34
+ const options = { ...DEFAULT_OPTIONS , ...userOptions , ... this . options . i18n }
35
35
// Options that have nested config options must be merged
36
36
// individually with defaults to prevent missing options
37
37
for ( const key of NESTED_OPTIONS ) {
Original file line number Diff line number Diff line change @@ -4,39 +4,38 @@ module.exports = {
4
4
render : {
5
5
resourceHints : false
6
6
} ,
7
- modules : [
8
- [ '@@' , {
9
- seo : true ,
10
- baseUrl : 'nuxt-app.localhost' ,
11
- locales : [
12
- {
13
- code : 'en' ,
14
- iso : 'en-US' ,
15
- name : 'English'
7
+ modules : [ '@@' ] ,
8
+ i18n : {
9
+ seo : true ,
10
+ baseUrl : 'nuxt-app.localhost' ,
11
+ locales : [
12
+ {
13
+ code : 'en' ,
14
+ iso : 'en-US' ,
15
+ name : 'English'
16
+ } ,
17
+ {
18
+ code : 'fr' ,
19
+ iso : 'fr-FR' ,
20
+ name : 'Français'
21
+ }
22
+ ] ,
23
+ defaultLocale : 'en' ,
24
+ lazy : false ,
25
+ vueI18n : {
26
+ messages : {
27
+ fr : {
28
+ home : 'Accueil' ,
29
+ about : 'À propos' ,
30
+ posts : 'Articles'
16
31
} ,
17
- {
18
- code : 'fr ' ,
19
- iso : 'fr-FR ' ,
20
- name : 'Français '
32
+ en : {
33
+ home : 'Homepage ' ,
34
+ about : 'About us ' ,
35
+ posts : 'Posts '
21
36
}
22
- ] ,
23
- defaultLocale : 'en' ,
24
- lazy : false ,
25
- vueI18n : {
26
- messages : {
27
- fr : {
28
- home : 'Accueil' ,
29
- about : 'À propos' ,
30
- posts : 'Articles'
31
- } ,
32
- en : {
33
- home : 'Homepage' ,
34
- about : 'About us' ,
35
- posts : 'Posts'
36
- }
37
- } ,
38
- fallbackLocale : 'en'
39
- }
40
- } ]
41
- ]
37
+ } ,
38
+ fallbackLocale : 'en'
39
+ }
40
+ }
42
41
}
You can’t perform that action at this time.
0 commit comments