mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-01-04 03:25:30 +08:00
Theme switch support (#3568)
### What problem does this PR solve? - [x] New Feature (non-breaking change which adds functionality) --------- Co-authored-by: Yingfeng <yingfeng.zhang@gmail.com> Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@ -2,6 +2,7 @@ import i18n from 'i18next';
|
||||
import LanguageDetector from 'i18next-browser-languagedetector';
|
||||
import { initReactI18next } from 'react-i18next';
|
||||
|
||||
import { createTranslationTable, flattenObject } from './until';
|
||||
import translation_en from './en';
|
||||
import translation_es from './es';
|
||||
import translation_id from './id';
|
||||
@ -19,7 +20,15 @@ const resources = {
|
||||
es: translation_es,
|
||||
vi: translation_vi,
|
||||
};
|
||||
|
||||
const enFlattened = flattenObject(translation_en);
|
||||
const viFlattened = flattenObject(translation_vi);
|
||||
const esFlattened = flattenObject(translation_es);
|
||||
const zhFlattened = flattenObject(translation_zh);
|
||||
const zh_traditionalFlattened = flattenObject(translation_zh_traditional);
|
||||
export const translationTable = createTranslationTable(
|
||||
[enFlattened, viFlattened, esFlattened, zhFlattened, zh_traditionalFlattened],
|
||||
['English', 'Vietnamese', 'Spanish', 'zh', 'zh-TRADITIONAL'],
|
||||
);
|
||||
i18n
|
||||
.use(initReactI18next)
|
||||
.use(LanguageDetector)
|
||||
|
||||
Reference in New Issue
Block a user