mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-17 11:09:06 +08:00
feat: Support Traditional Chinese (#336)
### What problem does this PR solve? Support Traditional Chinese Issue link: #335 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { LanguageTranslationMap } from '@/constants/common';
|
||||
import { IKnowledgeFile } from '@/interfaces/database/knowledge';
|
||||
import { IChangeParserConfigRequestBody } from '@/interfaces/request/document';
|
||||
import { useCallback, useState } from 'react';
|
||||
@ -53,7 +54,9 @@ export const useChangeLanguage = () => {
|
||||
const saveSetting = useSaveSetting();
|
||||
|
||||
const changeLanguage = (lng: string) => {
|
||||
i18n.changeLanguage(lng === 'Chinese' ? 'zh' : 'en');
|
||||
i18n.changeLanguage(
|
||||
LanguageTranslationMap[lng as keyof typeof LanguageTranslationMap],
|
||||
);
|
||||
saveSetting({ language: lng });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user