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

lang in url (with sveltekit) #9

Open
Jan-Jan opened this issue Sep 24, 2022 · 2 comments
Open

lang in url (with sveltekit) #9

Jan-Jan opened this issue Sep 24, 2022 · 2 comments

Comments

@Jan-Jan
Copy link

Jan-Jan commented Sep 24, 2022

Hi, thanks for this library!

I'm trying to use it with sveltekit. I have a path like /[lang]/about. Because I want to use i18n on all pages, and initialize it only once, I do so in /[lang]/+layout.svelte. How do I then access the i18n store in /[lang]/about/+page.svelte?

@Jan-Jan
Copy link
Author

Jan-Jan commented Sep 25, 2022

I found that isLoading doesn't get updated (even though I used it as $isLoading).

Also, I tried moving all the functionality to $lib/i18n.ts or even .svelte, but that definitely doesn't work (with error failed to load module for ssr: /src/lib/i18n).

@Jan-Jan
Copy link
Author

Jan-Jan commented Sep 25, 2022

FYI: It get language auto-detection to work from url using detection: { order: [path] }, but not if I move it to lib/i18n.ts

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