File tree 1 file changed +12
-7
lines changed
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ npm -i --save vuex-i18n
82
82
```
83
83
84
84
```
85
- yarn add vuex-i18n
85
+ yarn add vuex-i18n vuex
86
86
```
87
87
88
88
Next, open ` config/vue-i18n-generator.php ` and do the following changes:
@@ -99,20 +99,25 @@ php artisan vue-i18n:generate
99
99
100
100
Assuming you are using a recent version of vuex-i18n, adjust your vue app with something like:
101
101
``` js
102
- import store from ' ./ vuex' ;
102
+ import Vuex from ' vuex' ;
103
103
import vuexI18n from ' vuex-i18n' ;
104
+ import Locales from ' ./vue-i18n-locales.generated.js' ;
105
+
106
+ const store = new Vuex.Store ();
107
+
104
108
Vue .use (vuexI18n .plugin , store);
105
109
106
- import Locales from ' ./vue-i18n-locales.generated.js' ;
107
110
Vue .i18n .add (' en' , Locales .en );
108
111
Vue .i18n .add (' de' , Locales .de );
109
112
110
113
// set the start locale to use
111
- Vue .i18n .set (' en' );
114
+ Vue .i18n .set (Spark .locale );
115
+
116
+ require (' ./components/bootstrap' );
112
117
113
- const app = new Vue ({
114
- store, // inject store into all children
115
- el : ' #app ' ,
118
+ var app = new Vue ({
119
+ store,
120
+ mixins : [ require ( ' spark ' )]
116
121
});
117
122
```
118
123
You can’t perform that action at this time.
0 commit comments