next-with-lingui icon indicating copy to clipboard operation
next-with-lingui copied to clipboard

Notes

Open tricoder42 opened this issue 5 years ago • 6 comments

Hey @disintegrator, this looks really awesome!

I tried to improve it, but LinguiJS is missing few features:

  • to support reloading of messages without page refresh @lingui/loader need to receive a parameter, because for initial render we need compileNamespace=window.LINGUI_INIT, but for dynamically loading catalogs we need regular cjs or es export.

  • lingui extract --watch (or lingui watch) would be very useful to automatically extract messages.

  • i18n object could have method onLocaleRequest, where you could register callback (e.g. dynamic load of catalog) if locale is changed. Then we could use i18n.activate('en') to change active locale

So, I think for now you did the best what you can. I'll take a look next week how we could improve LinguiJS API to provide smoother implementation in SSR apps.

tricoder42 avatar Sep 21 '18 12:09 tricoder42