mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-12-20 15:12:40 +00:00
refactor: rename site to frontend
This commit is contained in:
19
frontend/src/lib/i18n/i18n.ts
Normal file
19
frontend/src/lib/i18n/i18n.ts
Normal file
@@ -0,0 +1,19 @@
|
||||
import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import resourcesToBackend from 'i18next-resources-to-backend';
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.use(resourcesToBackend((language: string) => import(`./locales/${language}.json`)))
|
||||
.init({
|
||||
fallbackLng: 'en',
|
||||
debug: import.meta.env.MODE === 'development',
|
||||
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
}
|
||||
});
|
||||
|
||||
export default i18n;
|
||||
Reference in New Issue
Block a user