File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,20 @@ let messages = axios.get('http://localhost/js/lang.js') // This is default route
75
75
You can also export messages to ECMAScript 6 standard JavaScript module with artisan command
76
76
```` php artisan export:messages ````
77
77
78
+ ## Export for npm localization packages like Lang.js
79
+ If you need special format of array that's recognised by some npm localization packages as [ Lang.js] ( https://github.com/rmariuzzo/Lang.js ) .
80
+
81
+ ```
82
+ // Call toFlat() instead of toArray()
83
+ ExportLocalization::export()->toFlat()
84
+
85
+ or
86
+
87
+ // For CLI usage
88
+ php artisan export:messages-flat
89
+
90
+ ```
91
+
78
92
## Some examples why would you use this package and messages over Laravel standard localization
79
93
80
94
```
You can’t perform that action at this time.
0 commit comments