mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-24 07:26:47 +08:00
### What problem does this PR solve? This change adds 'Vietnamese' to the list of supported languages in two components related to cross-language functionality. The addition expands language support by including Vietnamese as a selectable option ### Type of change - [x] New Feature (non-breaking change which adds functionality)
41 lines
817 B
TypeScript
41 lines
817 B
TypeScript
import { Select as AntSelect, Form } from 'antd';
|
|
import { useTranslation } from 'react-i18next';
|
|
|
|
const Languages = [
|
|
'English',
|
|
'Chinese',
|
|
'Spanish',
|
|
'French',
|
|
'German',
|
|
'Japanese',
|
|
'Korean',
|
|
'Vietnamese',
|
|
];
|
|
|
|
const options = Languages.map((x) => ({ label: x, value: x }));
|
|
|
|
type CrossLanguageItemProps = {
|
|
name?: string | Array<string>;
|
|
};
|
|
|
|
export const CrossLanguageItem = ({
|
|
name = ['prompt_config', 'cross_languages'],
|
|
}: CrossLanguageItemProps) => {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<Form.Item
|
|
label={t('chat.crossLanguage')}
|
|
name={name}
|
|
tooltip={t('chat.crossLanguageTip')}
|
|
>
|
|
<AntSelect
|
|
options={options}
|
|
allowClear
|
|
placeholder={t('common.languagePlaceholder')}
|
|
mode="multiple"
|
|
/>
|
|
</Form.Item>
|
|
);
|
|
};
|