This app includes multiple instances of sveltekit-i18n.
- SvelteKit does not provide server side load method for components.
- component's
loadin this example is replaced by exported init method. This method initializes related language mutation within parent page'sloadmethod. - after the load, appropriate props are delegated back to the component instance.
This approach is good for more complex apps.
You can view this demo live on Netlify.
- Download this example
- Run
npm ito install all dependencies (orpnpm i,yarn, etc.) - Run
npm run dev -- --opento preview (orpnpm run dev -- --open,yarn dev --open, etc.)