feat: improved locale selection (made button, use i18n)

This commit is contained in:
Aidan 2025-03-26 23:13:38 -04:00
parent bf4ed43f50
commit e98a80666f
9 changed files with 291 additions and 44 deletions

20
i18n.ts Normal file
View file

@ -0,0 +1,20 @@
import i18n from 'i18next';
import { initReactI18next } from 'react-i18next';
import LanguageDetector from 'i18next-browser-languagedetector';
i18n
.use(LanguageDetector)
.use(initReactI18next)
.init({
resources: {
'en-US': {
translation: require('./public/locales/en-US.json')
}
},
fallbackLng: 'en-US',
interpolation: {
escapeValue: false
}
});
export default i18n;