Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Notes #1

@tricoder42

Description

@tricoder42

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions