translation layer

This commit is contained in:
Felix Kaspar
2023-12-30 02:18:07 +01:00
parent 0bdda72caa
commit 8a5711cd86
10 changed files with 409 additions and 60 deletions

View File

@@ -0,0 +1,14 @@
import i18next from "i18next"
import resourcesToBackend from 'i18next-resources-to-backend';
i18next
.use(resourcesToBackend((language, namespace) => import(`./${namespace}/${language}.json`)))
.init({
// debug: true,
ns: ['common'], // Preload this namespace, no need to add the others
defaultNS: 'common',
fallbackLng: 'en',
interpolation: {
escapeValue: false,
}
});