2022-06-22 12:27:47 +05:30
|
|
|
import i18n from "sveltekit-i18n";
|
2022-06-21 23:39:59 +05:30
|
|
|
|
|
|
|
/** @type {import('sveltekit-i18n').Config} */
|
2022-06-22 12:27:47 +05:30
|
|
|
const config = {
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
locale: "en",
|
|
|
|
key: "common",
|
|
|
|
loader: async () => (await import("../i18n/common.json")).default
|
|
|
|
},
|
|
|
|
{
|
|
|
|
locale: "nb",
|
|
|
|
key: "common",
|
|
|
|
loader: async () => (await import("../i18n/nb.json")).default
|
|
|
|
}
|
|
|
|
]
|
|
|
|
};
|
2022-06-21 23:39:59 +05:30
|
|
|
|
2022-06-22 12:27:47 +05:30
|
|
|
export const { t, locale, locales, loading, loadTranslations } = new i18n(
|
|
|
|
config
|
|
|
|
);
|