you know what let's just change frontend framework again
This commit is contained in:
parent
c8cd483d20
commit
0d47f1fb01
115 changed files with 4407 additions and 10824 deletions
24
Foxnouns.Frontend/src/lib/i18n/index.ts
Normal file
24
Foxnouns.Frontend/src/lib/i18n/index.ts
Normal 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);
|
Loading…
Add table
Add a link
Reference in a new issue