aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/translations/index.js
diff options
context:
space:
mode:
authorAdrien Hopkins <[email protected]>2022-08-23 10:43:30 -0500
committerAdrien Hopkins <[email protected]>2022-08-23 10:43:30 -0500
commit5de2a508609f84af1b94f53b098b05092599150c (patch)
tree9ad7353126448a40457fb19741e561518bdb3166 /src/lib/translations/index.js
parent1072c7a213baeace777d18b888eb43086afeb87e (diff)
downloadcoinos-ui-5de2a508609f84af1b94f53b098b05092599150c.tar.gz
coinos-ui-5de2a508609f84af1b94f53b098b05092599150c.zip
fixed broken translations & use json locales instead of JS
Diffstat (limited to 'src/lib/translations/index.js')
-rw-r--r--src/lib/translations/index.js23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/lib/translations/index.js b/src/lib/translations/index.js
index 023da884..6ed83689 100644
--- a/src/lib/translations/index.js
+++ b/src/lib/translations/index.js
@@ -1,9 +1,28 @@
import i18n from 'sveltekit-i18n';
-import translations from './translations';
+import lang from './lang.json';
const config = {
initLocale: 'en',
- translations
+ translations: {
+ en: { lang },
+ fr: { lang }
+ },
+ loaders: [
+ {
+ locale: 'en',
+ key: '',
+ loader: async () => (
+ await import("../../locales/en.json")
+ ).default
+ },
+ {
+ locale: 'fr',
+ key: '',
+ loader: async () => (
+ await import("../../locales/fr.json")
+ ).default
+ }
+ ]
};
export const { t, l, locales, locale } = new i18n(config);