This repository was archived by the owner on Jul 16, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 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
8282```
8383
8484```
85- yarn add vuex-i18n
85+ yarn add vuex-i18n vuex
8686```
8787
8888Next, open ` config/vue-i18n-generator.php ` and do the following changes:
@@ -99,20 +99,25 @@ php artisan vue-i18n:generate
9999
100100Assuming you are using a recent version of vuex-i18n, adjust your vue app with something like:
101101``` js
102- import store from ' ./ vuex' ;
102+ import Vuex from ' vuex' ;
103103import vuexI18n from ' vuex-i18n' ;
104+ import Locales from ' ./vue-i18n-locales.generated.js' ;
105+
106+ const store = new Vuex.Store ();
107+
104108Vue .use (vuexI18n .plugin , store);
105109
106- import Locales from ' ./vue-i18n-locales.generated.js' ;
107110Vue .i18n .add (' en' , Locales .en );
108111Vue .i18n .add (' de' , Locales .de );
109112
110113// set the start locale to use
111- Vue .i18n .set (' en' );
114+ Vue .i18n .set (Spark .locale );
115+
116+ require (' ./components/bootstrap' );
112117
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 ' )]
116121});
117122```
118123
You can’t perform that action at this time.
0 commit comments