mirror of
https://github.com/ChenQihan666/Lolia-Nodes-Status-Pages.git
synced 2026-08-14 07:52:34 +08:00
Initial commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
import i18n from 'i18next'
|
||||
import { initReactI18next } from 'react-i18next'
|
||||
import LanguageDetector from 'i18next-browser-languagedetector'
|
||||
import en from '../locales/en/common.json'
|
||||
import zhCN from '../locales/zh-CN/common.json'
|
||||
import zhTW from '../locales/zh-TW/common.json'
|
||||
import frFR from '../locales/fr-FR/common.json'
|
||||
import deDE from '../locales/de-DE/common.json'
|
||||
|
||||
i18n
|
||||
.use(LanguageDetector)
|
||||
.use(initReactI18next)
|
||||
.init({
|
||||
resources: {
|
||||
en: { common: en },
|
||||
'zh-CN': { common: zhCN },
|
||||
zh: { common: zhCN },
|
||||
'zh-TW': { common: zhTW },
|
||||
fr: { common: frFR },
|
||||
'fr-FR': { common: frFR },
|
||||
de: { common: deDE },
|
||||
'de-DE': { common: deDE },
|
||||
},
|
||||
fallbackLng: 'en',
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
detection: {
|
||||
order: ['navigator'],
|
||||
},
|
||||
})
|
||||
|
||||
export default i18n
|
||||
Reference in New Issue
Block a user