Skip to content

Commit

Permalink
docs: add warning about current cache behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede committed Aug 31, 2023
1 parent 86bfbd4 commit ba93582
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions docs/content/2.guide/8.lazy-load-translations.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ About `defineI18nLocale` details, see the [here](/api/composables#defineI18nLoca
::

::alert{type="warn"}

The js / ts format is currently an experimental feature and is disabled by default.

If you want to use it, you must set the `experimental.jsTsFormatResource` module option to `true`.
Support for JS/TS format resources is an experimental feature and is disabled by default, to enable this set the `experimental.jsTsFormatResource` module option to `true`.
::

::alert{type="info"}
Expand Down Expand Up @@ -176,5 +173,11 @@ In the example above, only two files are defined for `files`, of course you can
By taking advantage of the characteristic that locale messages are overridden in sequence, it's possible to manage locale messages by defining them on a differential basis. By adding shared (common) locale messages as the first entry of `files`, followed by file entries of regional/dialectal locale messages, it's possible to manage resources while avoiding the duplication of locale messages.

::alert{type="info"}
Lazy loaded locale messages are cached by filename, when the same filename is used in the `files` array of other `locales`, once loaded, it will be used from cache.
Lazy loaded locale messages are cached based on their filename, `file` and `files` shared across locales will be used from cache once loaded.
::

::alert{type="warn"}
Please note that caching for JS/TS format resources is disabled by default as these files can return messages dynamically.

Support for enabling/disabling caching on a per file basis is currently in development.
::

0 comments on commit ba93582

Please sign in to comment.