Skip to content
Prev Previous commit
Next Next commit
Update README to reflect latest changes
  • Loading branch information
carestad committed Apr 19, 2018
commit aa6e44e5f18b340d20797672acd52d736e5165fd
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ return [
// each time you change configuration files.
// Attention: Should not be used in production mode due to decreased performance.
'disable_config_cache' => false,

// Split up the exported messages.js file into separate files for each locale.
// This is to ensue faster loading times so one doesn't have to load translations for _all_ languages.
'split_export_files' => true,
];
```

Expand Down Expand Up @@ -161,6 +165,9 @@ The files can then be generated using the artisan command:
This will generate two files in your target directory:
* `messags.js` contains your translation strings
* `config.js` contains your exported config values
* `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


Remember that the files needs to be regenerated using `php artisan js-localization:export` every time any translation strings are edited, added or removed.

Expand Down