Closed EliasVal closed 5 months ago
Thanks you for the question! It's indeed planned to get rid of intl-messageformat
on the client side, please see https://github.com/amannn/next-intl/issues/962.
For the time being, staying with translations within Server Components can be an alternative to avoid loading int-messageformat
on the client side.
Hope this helps!
@amannn Thanks for the quick reply and the amazing work on the package! What's the progress on #705 ? (And as for your comment on an issue I posted a while back, the new option to opt out of the i18n routing works flawlessly!)
You can follow https://github.com/amannn/next-intl/pull/705 for the latest progress, but it's still a bit early. There are currently a few other priorities, but I'd like to get back to that PR as soon as I find the time. I can't really give an estimate currently, but the feature is rather months away I guess.
Since it's quite a change, there might be an opt-in experimental flag in the future to get feedback from early adopters. Might take a bit for the feature to stabilize, also icu-to-json
that's mentioned in the PR is experimental at this point.
If you subscribe to the PR or the issue, I can keep you in the loop!
And as for your comment on an issue I posted a while back, the new option to opt out of the i18n routing works flawlessly!
Cool, that's nice to hear! 🙌
Is your feature request related to a problem? Please describe.
While building my Next.js app, I noticed that
intl-messageformat
is taking up quite a bit of space.page.tsx
withuseTranslations
:page.tsx
withoutuseTranslations
:Bundle analyzer result with
useTranslaions
:Describe the solution you'd like
Either have the option to somehow opt-out of formatting, or lazy-load it on the client.
Describe alternatives you've considered
Haven't looked into any other solutions.