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 +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -28,33 +28,34 @@ Then generate the include file with
2828php artisan vue-i18n:generate
2929```
3030
31- For vue 1.0, adjust your vue app with something like:
32-
31+ Assuming you are using a recent version of vue-i18n, adjust your vue app with something like:
3332``` js
3433import Vue from ' vue' ;
35- import VueInternationalization from ' vue-i18n' ;
34+ import VueInternalization from ' vue-i18n' ;
3635import Locales from ' ./vue-i18n-locales.generated.js' ;
3736
38- Vue .use (VueInternationalization, {
39- lang: ' en' ,
40- locales: Locales
37+ Vue .use (VueInternalization);
38+
39+ Vue .config .lang = ' en' ;
40+
41+ Object .keys (Locales).forEach (function (lang ) {
42+ Vue .locale (lang, Locales[lang])
4143});
4244
4345...
4446```
4547
46- For vue 2.0, adjust your vue app with something like:
48+
49+ For older vue-i18n, the initialization looks something like:
50+
4751``` js
4852import Vue from ' vue' ;
49- import VueInternalization from ' vue-i18n' ;
53+ import VueInternationalization from ' vue-i18n' ;
5054import Locales from ' ./vue-i18n-locales.generated.js' ;
5155
52- Vue .use (VueInternalization);
53-
54- Vue .config .lang = ' en' ;
55-
56- Object .keys (Locales).forEach (function (lang ) {
57- Vue .locale (lang, Locales[lang])
56+ Vue .use (VueInternationalization, {
57+ lang: ' en' ,
58+ locales: Locales
5859});
5960
6061...
You can’t perform that action at this time.
0 commit comments