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
28
28
php artisan vue-i18n:generate
29
29
```
30
30
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:
33
32
``` js
34
33
import Vue from ' vue' ;
35
- import VueInternationalization from ' vue-i18n' ;
34
+ import VueInternalization from ' vue-i18n' ;
36
35
import Locales from ' ./vue-i18n-locales.generated.js' ;
37
36
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])
41
43
});
42
44
43
45
...
44
46
```
45
47
46
- For vue 2.0, adjust your vue app with something like:
48
+
49
+ For older vue-i18n, the initialization looks something like:
50
+
47
51
``` js
48
52
import Vue from ' vue' ;
49
- import VueInternalization from ' vue-i18n' ;
53
+ import VueInternationalization from ' vue-i18n' ;
50
54
import Locales from ' ./vue-i18n-locales.generated.js' ;
51
55
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
58
59
});
59
60
60
61
...
You can’t perform that action at this time.
0 commit comments