-
Notifications
You must be signed in to change notification settings - Fork 10
Notes #1
Description
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/loaderneed to receive a parameter, because for initial render we needcompileNamespace=window.LINGUI_INIT, but for dynamically loading catalogs we need regular cjs or es export. -
lingui extract --watch(orlingui watch) would be very useful to automatically extract messages. -
i18nobject could have methodonLocaleRequest, where you could register callback (e.g. dynamic load of catalog) if locale is changed. Then we could usei18n.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.