Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Lazy-loading of languages #351

Closed
moufmouf opened this issue Jan 29, 2025 · 1 comment
Closed

[Question] Lazy-loading of languages #351

moufmouf opened this issue Jan 29, 2025 · 1 comment

Comments

@moufmouf
Copy link

Hey,

I'm currently looking into migrating a project from typesafe-i18n to ParaglideJS. I have been reading the philosophy of Paraglide and I think understand it.
I'm in a bit of a weird situation though. The project I'm working on is https://github.com/workadventure/workadventure
It is a platform to build virtual universes (virtual offices, ...). It is based on pure Svelte + Phaser game engine (there is no SvelteKit since we don't even have the notion of pages). Everything is one big SPA.

I understand the philosophy of ParaglideJS: relying on tree-shaking to ship only the needed messages.
In my case, most of the messages will be loaded directly.

However, I would like to avoid shipping all the languages at once. A typical language file weights 50kB so far and I have about a dozen languages supported. If I could avoid shipping those languages, that would be awesome.

Hence my question: is it possible to do lazy-loading of messages with Paraglide at all? It is mentioned in one of the videos of the pre-release but I couldn't find how to do it.

Sorry if this is not the right place to ask a question.

@moufmouf
Copy link
Author

Closing this as I discovered this issue is already talking about it: #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant