you know what let's just change frontend framework again

This commit is contained in:
sam 2024-11-24 15:55:29 +01:00
parent c8cd483d20
commit 0d47f1fb01
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
115 changed files with 4407 additions and 10824 deletions

View file

@ -0,0 +1,24 @@
import { PUBLIC_LANGUAGE } from "$env/static/public";
import i18n, { type Config } from "sveltekit-i18n";
const config: Config<any> = {
initLocale: PUBLIC_LANGUAGE,
fallbackLocale: "en",
loaders: [
{
locale: "en",
key: "",
loader: async () => (await import("./locales/en.json")).default,
},
{
locale: "en-PR",
key: "",
loader: async () => (await import("./locales/en-PR.json")).default,
},
],
};
export const { t, locales, locale, translations, loadTranslations, setLocale } = new i18n(config);
loadTranslations(PUBLIC_LANGUAGE);
setLocale(PUBLIC_LANGUAGE);