Initial commit

This commit is contained in:
Djuri 2023-11-17 01:05:35 +01:00
commit 96d609a89e
34 changed files with 4978 additions and 0 deletions

10
src/hooks.server.ts Normal file
View file

@ -0,0 +1,10 @@
import type { Handle } from '@sveltejs/kit'
import { locale } from 'svelte-i18n'
export const handle: Handle = async ({ event, resolve }) => {
const lang = event.request.headers.get('accept-language')?.split(',')[0]
if (lang) {
locale.set(lang)
}
return resolve(event)
}