i18n icon indicating copy to clipboard operation
i18n copied to clipboard

Runtime dynamic loading of messages

Open memic84 opened this issue 6 months ago • 1 comments

Describe the feature

When loading and fetching messages for external sources, the current advised solution (https://i18n.nuxtjs.org/docs/composables/define-i18n-locale) is during build time, which means for every change in messages we need to run the build/deploy again.

"A function that is the dynamic locale messages loading, that has the following parameters:"

Does this mean that all the messages are fetched only during build, and after that they are lazy loaded?

It would be nice to have a feature, where the messages are cached and aren't loaded during build time.

Would it be possible to implement this?

Additional information

  • [x] Would you be willing to help implement this feature?
  • [ ] Could this feature be implemented as a module?

Final checks

memic84 avatar Jun 19 '25 08:06 memic84

If you're using dynamic locale messages and fetching from an external source you don't have to build and redeploy your project when messages change. The messages are loaded/fetched both during build and at runtime (using a very short lived cache).

Are you running into specific issues? If so, could you provide a minimal reproduction? 🙏

BobbieGoede avatar Oct 26 '25 09:10 BobbieGoede