Skip to content

Are the translations loaded reduced to its minimum? #439

Answered by ivanhofer
binajmen asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @binajmen,

no, currently all translations of the selected locale will be loaded.

Workaround

You can manually split them if you think they are too large via the namespaces feature. So you could structure your translations like this:

src/i18n/en

 - logged-out
    - index.ts # login, reset-password etc.
 - dashboard
    - index.ts # everything you'll display on the dashboard
 - settings
    - index.ts # settings page
 - index.ts # common translations

Then you can load the required namespaces depending on the route your user visits.

Something in this direction is planned for the future

I have some build-time optimizations in the pipeline, but I haven't started implementing them yet.

Why it…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@binajmen
Comment options

Answer selected by binajmen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants