Skip to content
Prev Previous commit
Next Next commit
Improve README for the static generation part a bit
  • Loading branch information
carestad committed Apr 19, 2018
commit 066485e29ff5ccc282d946b830e396266f57c0d5
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ The files can then be generated using the artisan command:
This will generate two files in your target directory:
* `messages.js` contains your translation strings
* `config.js` contains your exported config values

If you want to automatically split up the `messages.js` file into separate .js files for each locale, you can set the following to true in your `config/js-localization.php` config file:

```
'split_export_files' => true,
```

This will in turn _also_ generate the following file(s) in your target directory:
* `lang-{locale}.js` contains one language's translation strings, if the `split_export_files` config option is set to true

With static generation you can also make use of `@yield('js-localization.head.exported')` in your blade template. This will automatically include your statically generated .js files for you.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andywer I briefly mention the new @yield here, which is related to the @section part below

Expand Down