Replies: 2 comments 8 replies
-
The logic in your getSession hook should now be moved into import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async ({ locals, request }) => {
const locale = somehowGetTheLocale(request);
return {
locale
};
}; now you can access it like this: <script>
import { page } from '$app/stores';
$: console.log($page.data.locale);
</script> |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi it helped a little to understand. But the code is immense. Can you help more? |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi loved sveltekit but just one update broke all my structure of [lang]. There is no info regarding resolve etc. How can we rewrite the code below?
Beta Was this translation helpful? Give feedback.
All reactions