mirror of
https://github.com/VaalaCat/frp-panel.git
synced 2025-09-26 19:31:18 +08:00
add i18n (fix=>fr,add=>zhtw) resources
This commit is contained in:
@@ -2,7 +2,9 @@ import i18n from 'i18next';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
import { $language } from '@/store/user';
|
||||
import enTranslation from './locales/en.json';
|
||||
import frTranslation from './locales/fr.json';
|
||||
import zhTranslation from './locales/zh.json';
|
||||
import zhtwTranslation from './locales/zhtw.json';
|
||||
|
||||
const savedLanguage = $language.get();
|
||||
|
||||
@@ -13,9 +15,15 @@ i18n
|
||||
en: {
|
||||
translation: enTranslation,
|
||||
},
|
||||
fr: {
|
||||
translation: frTranslation,
|
||||
},
|
||||
zh: {
|
||||
translation: zhTranslation,
|
||||
},
|
||||
zhtw: {
|
||||
translation: zhtwTranslation,
|
||||
},
|
||||
},
|
||||
lng: savedLanguage || 'zh',
|
||||
fallbackLng: 'zh',
|
||||
|
@@ -2,7 +2,9 @@ import i18next from 'i18next'
|
||||
import { initReactI18next } from 'react-i18next'
|
||||
import { atom } from 'nanostores'
|
||||
import enTranslations from '../i18n/locales/en.json'
|
||||
import frTranslations from '../i18n/locales/fr.json'
|
||||
import zhTranslations from '../i18n/locales/zh.json'
|
||||
import zhtwTranslations from '../i18n/locales/zhtw.json'
|
||||
|
||||
const LANGUAGE_KEY = 'LANGUAGE'
|
||||
|
||||
@@ -23,9 +25,15 @@ i18n
|
||||
en: {
|
||||
translation: enTranslations,
|
||||
},
|
||||
fr: {
|
||||
translation: frTranslations,
|
||||
},
|
||||
zh: {
|
||||
translation: zhTranslations,
|
||||
},
|
||||
zhtw:{
|
||||
translation: zhtwTranslations,
|
||||
}
|
||||
},
|
||||
lng: getInitialLanguage(),
|
||||
fallbackLng: 'zh',
|
||||
|
Reference in New Issue
Block a user