Skip to content

Commit 82316dc

Browse files
authored
Merge pull request #24 from ridaamirini/patch-1
Update README.md
2 parents c3ee8f3 + 7610f0d commit 82316dc

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ let messages = axios.get('http://localhost/js/lang.js') // This is default route
7575
You can also export messages to ECMAScript 6 standard JavaScript module with artisan command
7676
```` php artisan export:messages ````
7777

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+
7892
## Some examples why would you use this package and messages over Laravel standard localization
7993

8094
```

0 commit comments

Comments
 (0)