Issues with the integration in a static Sveltekit application #655
-
|
Hi! I am unsure with what exactly is meant with the root-component? Is it the +layout.svelte file? I only receive an empty h1 tag and also logging the stores content I receive the message . |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Yes, the root-component is the first component in your render tree. In a SvelteKit application this would be You need to first load the locale you want to use (https://github.com/ivanhofer/typesafe-i18n/tree/main/packages/generator#loading-locales) and then call
|
Beta Was this translation helpful? Give feedback.

Yes, the root-component is the first component in your render tree. In a SvelteKit application this would be
routes/+layout.svelteand in a Svelte application this will probably beApp.svelte.You need to first load the locale you want to use (https://github.com/ivanhofer/typesafe-i18n/tree/main/packages/generator#loading-locales) and then call
setLocale(locale)in order to setup the svelte store.typesafe-i18nworks in all kind of applications. But depending on how your project setup is it could requre additional steps or some steps may slightly change.