Splitting locales.js into files per language #2130
Unanswered
klunderjeff-printabout
asked this question in
Q&A
Replies: 1 comment 6 replies
-
Show the snippet which is loading the catalog. I'm 95% sure you are just importing them without |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
After we build our project, we get one locales.js file, which holds all texts in all used languages. Performance wise this isn't great. Reading the documentation and editing our i18n.ts file as prerscribed, no changes are visible after a build. We would expect to get several locales.js files (locales-nl.js, locales-fr.js, etcetera).
Using rspack as our bundler, we initially had below snippet. We commented this out, but perhaps it needs editing to get the file splitting to work?
Project info, using:
react
|_ locales
|_ subfolder per language (nl-NL, fr-FR, de-DE)
|_ messages.po
|_ messages.ts
|_ messages.d.ts
Beta Was this translation helpful? Give feedback.
All reactions