Skip to content

Commit 4b9c4c9

Browse files
Naoraymartinlindhe
authored andcommitted
Update README.md (martinlindhe#34)
1 parent 507fa3d commit 4b9c4c9

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

README.md

+12-7
Original file line numberDiff line numberDiff 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

8888
Next, open `config/vue-i18n-generator.php` and do the following changes:
@@ -99,20 +99,25 @@ php artisan vue-i18n:generate
9999

100100
Assuming 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';
103103
import vuexI18n from 'vuex-i18n';
104+
import Locales from './vue-i18n-locales.generated.js';
105+
106+
const store = new Vuex.Store();
107+
104108
Vue.use(vuexI18n.plugin, store);
105109

106-
import Locales from './vue-i18n-locales.generated.js';
107110
Vue.i18n.add('en', Locales.en);
108111
Vue.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

0 commit comments

Comments
 (0)