You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have two parts of my web app, one is public and the second is private hidden behind a login form. If you read the i18n file (which you can access even if you're unauthorized), you can approximate what the private part looks like.
Describe the solution you'd like
Be able to separate JSON for one locale to different files and restrict some of them.
Describe alternatives you've considered
My current solution is to load the admin JSON in my +layout.server.ts and then load it into svelte i18n in my +layout.svelte
The second alternative is to leave as-is and hope no one digs too deep. How important is this feature to you?
Quite a lot, because I don't want people to know what the private part of the web app looks like.
The text was updated successfully, but these errors were encountered:
A good approach would be to only load the translations for the keys used on the loaded page. This would also improve performance for larger dictionaries.
@kyngs@LVitus after authorized into private routes, you can call addMessages() to add your sensitive translation dictionary from DB or protected API or from server side via data props on load() of those private +page.js
@kyngs@LVitus after authorized into private routes, you can call addMessages() to add your sensitive translation dictionary from DB or protected API or from server side via data props on load() of those private +page.js
Is your feature request related to a problem? Please describe.
I have two parts of my web app, one is public and the second is private hidden behind a login form. If you read the i18n file (which you can access even if you're unauthorized), you can approximate what the private part looks like.
Describe the solution you'd like
Be able to separate JSON for one locale to different files and restrict some of them.
Describe alternatives you've considered
My current solution is to load the admin JSON in my +layout.server.ts and then load it into svelte i18n in my +layout.svelte
The second alternative is to leave as-is and hope no one digs too deep.
How important is this feature to you?
Quite a lot, because I don't want people to know what the private part of the web app looks like.
The text was updated successfully, but these errors were encountered: